Big O Time
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjP9nEvWktEKv97sYwX3rIw0XIEsVKexL1jp1KDf8fghxXaDR4l0yOCjS0ucnX1pES8wU9Y5yem7nUStS8V9oM_2YIAbGFL0B4B24Wlt6JpMdOhwrtdO1fRGFue-i2Hw4MetYTqbl7rcbKN/s320/big0.png)
Here's a great way to approximate the Big O time of your algorithm: just run it with differently sized inputs. That's right, that's all you have to do* (*there's more to it, we'll get to it in a sec). You don't need to follow your inputs around, count any loops, look for best case and worse case scenarios. You can get a pretty good approximation by following the steps below. 1. Speed test your algorithm . Make sure you have at least 3 inputs - if you're working with an array, make sure there's 3 elements, if you have a string make sure there's at least 3 letters, etc. Larger inputs will make this test more accurate. Note down how fast your algorithm was. 2. Double the number of inputs. 3. Speed test your algorithm again. Got a number? Good. 4. Now, divide the second speed test result by the first one. Once you've got that ratio, you're good to go! Simply compare your ratio to the following chart: Ratio Big O time approximately 1 O(1)...