Pregunta de entrevista de Rakuten

Complete a typical algorithm coding exercise