Robinhood interview question

Coding questions with array applications