Squarepoint Capital interview question

first round technical live coding leetcode medium to hard level