educative.io

Example 1: Measuring Time Complexity Math Question


#1

The equation shows: Time complexity = 1 + 1 + n + (1 + 1 + 1 + … + 1) + 2n + 1⇒
= 2 + n + n + 2n + 1⇒4n

Shouldn’t 2 + n + n + 2n +1=>4n + 3?