בסעיף 2, צריך להתייחס בנפרד ל - nים קטנים מ - 105 ו - nים גדולים מ - 105? או שמספיק לתת את הסיבוכיות עבור n0=10**5?
At a certain point, the inner loop (k) might not run at all. Should we still count the middle loop (j) as an O(1) even if the k loop does not run? I mean, is j+=1 counts as an action with O(1)?
j+=1 counts as an action of O(1) time
would it be correct to assume that in case j>=(10^5+1):
Then the loop:
for k in range(10**5, j, -5): print(i)
would run in O(0), no operation takes place, only the condition for the function is checked and there is no print…
suppose a function recieve a number (n) and prints "hello" (one time) if n <10^5, and prints n times "hello" if n>=10^5.
assuming each time "hello" is printed takes O(1).
does the complexity of this function is O(n)?