Question d’entretien chez Apple

Maximum subarray sum problem with Kadane's algorithm.