Pregunta de entrevista de Layer6 AI

solve a leetcode question (easy-medium)