Optimizing an Algorithm That's Quadratic by Design | Dark Hacker News