Robinhood Interview Question

Already listed on this site (also see Leetcode discussions)