Pregunta de entrevista de NVIDIA

Practical Python function question, not really leetcode.