Bloomberg Interview Question

Medium Leetcode style question about arrays