Infosys Interview Question

12 Ball Puzzle.