Question d’entretien chez Amazon

Maximum subarray sum. DSA question in OA round