Challenge 2: Big (O) of Nested Loop with Subtraction

Compute Big O of an algorithm that involves nested loops and the loop variables decrement.

We'll cover the following

Problem statement

Test your time complexity skills. Compute the Big O time complexity of the code snippet given below. It is better to solve it on a piece of paper, and then see if your answer matches the correct option!

Code snippet

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.