Pregunta de entrevista de Sunbit

Write a solution for a task from leetcode.