Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Test 9, #5
#1
T or F: If there are two nested loops and the time complexity of the outer loop is A and the time complexity of the inner loop is B, the the overall time complexity is O(AB). 

The correct answer according to the forum is T, but isn’t this assuming that AB are the only nested loops in the program for it to be an overall complexity? 


I’ve been really cautious about making assumptions with this test, and I put down False because there could possibly be a nested C, D, E which would end up being the overall time complexity if higher than AB.

Any thoughts on this?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)