LeetCode: 53번 (Maximum Subarray) [JAVA]
문제 링크 https://leetcode.com/problems/maximum-subarray/ Maximum Subarray - LeetCode Can you solve this real interview question? Maximum Subarray - Given an integer array nums, find the subarray with the largest sum, and return its sum. Example 1: Input: nums = [-2,1,-3,4,-1,2,1,-5,4] Output: 6 Explanation: The subarray [4,-1,2,1] has t leetcode.com 풀이 전체적인 풀이 과정은 다음과 같다. 두 개의 변수, minAcc, acc 선언 fo..