Pergunta de entrevista da empresa Oracle

problem based on the graph