ANZ Interview Question

Coding test for python, medium difficulty leetcode problem