Squarepoint Capital interview question

Easy level Leetcode style question