Consider the problem size as 'n. Find the worst case time complexity of the following algorithm.
if numl>num2 then
for (counterl=1;counterl<=n;counterl=counterl*2)
print ("numl is greater than num2")
end-for
else
for(counter2=1;counter2<=n; counter2=counter2+1) {
print ("num2 is greater than numl")
end-for
end-if
o
O(n)
O O(n)
O O(log n)
O O(n log n)
Answers
Answered by
0
Answer:
sorry bro I can't answer this question because I didn't understand this
Similar questions