Question: For the code snippet below, what is the big-O complexity? def my_func(my data) result = 0 for item in my data: if is prime(item): #

For the code snippet below, what is the big-O complexity? def my_func(my data) result = 0 for item in my data: if is prime(item): # is prime is a function that runs in O(n^3) time result.append(item) return result
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
