Pregunta de entrevista de Pou Chen

Problem solving for some case when in college