Robinhood Interview Question

4 coding test on CodeSignal: 2 easy level, 2 medium level