Chatham Financial Interview Question

Simple Leetcode problem that can be solved