...
/Solution: Big (O) of Nested Loop With Subtraction
Solution: Big (O) of Nested Loop With Subtraction
This review provides a detailed analysis of the time complexity of the Nested Loop with Subtraction problem!
We'll cover the following...
We'll cover the following...
Solution #
On line 6 in the outer loop, var i=n; runs once, i>=1; gets executed times and i-=3 executed times. In the inner loop, var j=n; gets executed times in total, j>=0; executes times and j-- gets executed ...