Algorithms in PHP: Deques | Hacker News Reader