One of my favorite problems is solving median based on a stream of data that you can replay, but only using, something like 3 variables of the same type of the data (which I think needs to be integer) from the book Numerical Recipes in FORTRAN.<p>It’s to optimize finding the median from a tape drive in the 70s, but the technique is pretty cute.<p>You make a guess at the median, then basically sum how many are over, and under that value, then guess again until you have an even split.<p>It’s also a problem I like to use to nerd snipe people, because why not.<p>Check my work, because it’s been a long time since I worked with FORTRAN and I could have just remembered incorrectly :)<p><a href="https://github.com/jonlighthall/nrf77/blob/master/mdian2.f" rel="nofollow">https://github.com/jonlighthall/nrf77/blob/master/mdian2.f</a>