Pregunta de entrevista de TikTok

A question on problem solving coding