Pregunta de entrevista de Oracle

algorithm. and solution based approach