IBM Interview Question

some puzzles