Programming Question

Question: You are given an array of integers (both positive and negative). Find the contiguous sequence with the largest sum. Return the sum. Input: 2, -8, 3, -2, 4, 10 Output: 5 (i.e., {3, -2, 4})

From: Cracking the Coding Interview [McDowell]

Subject: Moderate

Load Another Question


Select a Subject