Algorithm Puzzle: Triplets in Array | Hacker News Reader