Robinhood Interview Question

spiral array