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

State the complexity of algorithm given below.
Code:
	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)
 

Tìm kiếm

Back
Top