Determine the asymptotic running time for the following piece ofcode. n represents the input size. Show work in summation form.

a)

for(i = 0; i < length(a); i++)

    binary_search(a,a[i])       //key = a[i]

b)

for (i = 0; i < n; i++)

    for(j = 0; j < n; j++)

        linear_search(a,key);      //key is not in array,length(a) == n