Sollicitatievraag bij Squarepoint Capital

Live leetcode medium level question. Know how to analyze runtime