Oracle interview question

there were 2 coding questions asked in second round.