How do you guys come up with such an algorithm | Hacker News Reader