Pregunta de entrevista de Galadrim

code a function in a given situation and develop it more