1800. Maximum Ascending Subarray Sum
Given an array of positive integers
nums
, return the maximum possible sum of an ascending subarray innums
.A subarray is defined as a contiguous sequence of numbers in an array.
A subarray
[numsl, numsl+1, ..., numsr-1, numsr]
is ascending if for alli
wherel <= i < r
,numsi < numsi+1
. Note that a subarray of size1
is ascending.
1 | class Solution { |