What is the input size of the method


Problem

The following method is given:

search (int A[], int K) {
for(i=0;i<|A|;i++)
for(j=i+1;j<|A|;j++)
if(A[i]+A[j]=K) //check if element in index I and in index j adds up to K
return true
return false
}

1. What is the input size of the method? Justify your answer
2. Determine the growth function of the method. Justify your answer
3. Determine the complexity of the method.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: What is the input size of the method
Reference No:- TGS03222538

Expected delivery within 24 Hours