IBM Interview Question

Go do a leetcode medium and that sums it up.