So I was given this algorithm to compute the efficieny in which I found sorts an array into ascending order.
solvethis(T[1..n])
for i = 1 to n-1 do //n
minJ = i //n-1
minX = T[i] //n-1
for j = i+1 to n do //sum_{i=1}^{n} t
if T[j] < minX then ** //sum_{i=1}^{n} t-1
minJ = j //sum_{i=1}^{n} t-1
minX = T[j] ////sum_{i=1}^{n} t-1
T[minJ] = T[i] //n-1
T[i] = minX //n-1
I also listed the number of times the line of code is run. I need to find the efficiency and how many time the line at ** is calculated. Any help is appreciated thank you.