How Kadane’s algorithm finds the maximum subarray in one pass
6 min read Kadane’s algorithm finds the largest contiguous subarray sum in a single pass, and the interview really lives in the follow-ups: all-negative inputs, returning indices, and the product and circular variants. Read article
