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.

Community Answers

1 answer from the community

Unlock Full Access

Answer any un-answered question from our database to unlock all community answers for 30 days.

Give & Take

Practice More Questions

1 answer published. Last candidate submission on Sep 20 2026, 2:15am PDT. Interview question asked to Software Engineers interviewing at Teem, Clever, Indeed.com and other companies. Original question asked: Maximum Subarray Sum. Question last reported by a candidate interviewing at Asana for a Software Engineer interview on Sep 6 2026, 9:28am PDT.