What is the time complexity of while loops?
When you gotta do something n times, you have to do it n times. You can use a for loop, a while loop or whatever that your programming language (or pseudo code!) offers. Crudely, big O notation comments on the amount of work you have to do, and doesn’t care about how you do it … Read more