Robinhood Interview Question

Greatness challenge I have faced