Pregunta de entrevista de Oracle

AN algorithm will be asked. difficulty level average