Letā€™s dive deeper into the time complexity analysis by looking at some examples.

Example 1: for loop

The case below is a for loop. We have a time complexity of O(n)O(n).

Get hands-on with 1400+ tech skills courses.