1.

 State the complexity of algorithm gien below int function(vector<int> arr) int len=arr.length(); if(len==0) return; temp=arr[len-1]; arr.pop_back(); return temp;

A. o(n)
B. O(logn)
C. O(1)
D. O(n logn)
Answer» D. O(n logn)


Discussion

No Comment Found