Question: 1 What is the time complexity of the function get_first () shown below? 1 . 2. def get_first(data): 3. return data[0] 4 . 5. if

 1 What is the time complexity of the function get_first ()

1 What is the time complexity of the function get_first () shown below? 1 . 2. def get_first(data): 3. return data[0] 4 . 5. if name ==main ': 6. data =[1,2,9,8,3,4,7,6,5] 7. print (get_first(data)) 8. (a) T(n)=O(1) (b) T(n)=O(n) (c) T(n)=O(n2) (d) T(n)=O(n3)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!