Oracle interview question

Puzzle solving