GCM Grosvenor interview question

Technical portion was a singular leetcode medium problem. Not hard