Squarepoint Capital Interview Question

Easy level Leetcode style question