Question d’entretien chez Amazon

Find Longest subsequent array with maximum sum