Bank of America Interview Question

standard leetcode style problem, current financial experience