Robinhood interview question

Leetcode Hard Leetcode Medium