Alright, I didn't get this one quite right on the homework, but I am trying to figure out exactly how to solve this thing. The answer was n log n , but how do you total this up when going through the loop
i = n 1
while i >= 1 n
j = i 1
while j <= n n?
<body of the j loop>, needs Theta(1) \\Theta (1)
j = j*2 1
end j while
i =i-1 1
end i while
Now when I total up I disregard so I left with n. Now I assume that the inner loop is log n, but I don't fully understand. Thanks for any help.