Pregunta de entrevista de ANZ

Coding test for python, medium difficulty leetcode problem