PTC interview question

Data structures and algorithms and puzzles