by codezero · 6y ago · 0 comments
It’s to optimize finding the median from a tape drive in the 70s, but the technique is pretty cute.
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.
It’s also a problem I like to use to nerd snipe people, because why not.
Check my work, because it’s been a long time since I worked with FORTRAN and I could have just remembered incorrectly :)
No comments yet.