Pregunta de entrevista de Capital One

The programming question was an easy/medium Leetcode programming questions