Coding

Maximum Subarray Sum

Find the maximum subarray sum in an integer array.

Input: nums = [-3,-4,-1,-2]

Output: -1

Explanation: Kadane's algorithm correctly identifies that the single isolated element -1 provides the highest possible sum.

Was asked at

Practice this question with AI

First session is free - no credit card required.

Go Premium

More interviews, more skills, more success.

Practice More Questions

Interview question asked to Software Engineers interviewing at Revolut, DocuSign, Yelp and other companies. Original question asked: Maximum Subarray Sum.