Pregunta de entrevista de Gusto

one average Leetcode question. Not too difficult.