Robinhood Interview Question

they were 2 leetcode hard problems