Understand what the interviewer is asking for by using test cases and questions about the problem. Established a set (2-3) of test cases to verify their own solution later. Established a set (1-2) of ...
maxSoFar to store the maximum sum of any subarray encountered so far, initialized to the smallest possible integer (or arr[0] if the array has at least one element). maxEndingHere to store the maximum ...