DEV Community

Discussion on: Understanding Time Complexity

Collapse
 
rockykev profile image
Rocky Kev

Lets say someone picks a number at random from this list [1, 3, 13, 43, 46, 52, 58, 63, 72], and you're trying to guess their number.

Mathmatically, the fastest way to pick the right number is to cut the results in half with each guess.

This is great! I always struggled with trying to understand some of the real world implications. And this makes a lot more sense of when to use it.