Pergunta de entrevista da empresa Bloomberg

Maximum difference between two elements such that larger element appears after the smaller number