Pergunta de entrevista da empresa DataStork

Design solution for MaxProfit calculation for an array