A math puzzle and a better algorithm for top-K | Dark Hacker News