Wells Fargo Interview Question

Leetcode question easy to medium