DataStork Interview Question

Design solution for MaxProfit calculation for an array