Time Complexity for a for loop

  analysis, c++

How come the time complexity of this for loop is n+1? I understand that the big o notation of this for loop is O(n), but I’m confused on why it’s n+1 specifically.

for(int i = 0; i < n; i++)

Also, would the time complexity of this for loop be n + 2?

(int i = 1; i < n; i++)

Source: Windows Questions C++

LEAVE A COMMENT