Oracle interview question

A question about Cards puzzle.