0
time complexity (loop with unknown iteration count)
what is the complexity of this kind of loop: while (true){ input = integerinput limit = limitnumber if (input > limit){ print ("try again") } else { print(input) break; } }
2 Answers
+ 3
Learn this first you can easily get your answer
https://www.google.com/amp/s/www.geeksforgeeks.org/understanding-time-complexity-simple-examples/amp/
+ 1
As long as input is geather than limit you will stay in the loop and have to give new number.
Else the input will be printed and the loop left.