o2h Group interview question

Javascript fundamentals, Algorithms and data structures and puzzles