【Easy】044. Minimum Subarray
Given an array of integers, find the subarray with smallest sum. Return the sum of the subarray.
Notice:
The subarray should contain one integer at least.
Example:
For [1, -1, -2, 1], return -3.
解题思路
与041. Maximum Subarray完全一致。
时间空间复杂度
O(n) + S(1)
n为数组长度
Last updated