👩💻 Join our community of thousands of amazing developers!
1800.最大升序子数组和模拟 / dpJS123456789101112var maxAscendingSum = function(nums) { let max = nums[0], sum = nums[0]; for (let i = 0; i < nums.length; i++) { if (nums[i] < nums[i + 1]) { sum += nums[i + 1]; max = max > sum ? max : sum; } else { sum = nums[i + 1]; } } var maxAscendingSum = function(nums) { let max = nums[0], sum = nums[0]; for (let i = 0; i < nums.length; i++) { if (nums[i] < nums[i + 1]) { sum += ...