Solution: Big O of a Nested Loop with Subtraction
This review provides a detailed analysis of the different ways to solve the Nested Loop with Subtraction challenge.
We'll cover the following...
We'll cover the following...
Given Code #
Solution Breakdown
On line 8 in the outer loop, int var=n; runs once, var>=1; gets executed times and var-=3 executed times. In the inner loop, int j=n; gets executed times in total, j>=0; executes times and j=j-1 gets executed ...