
[LeetCode] 1800. Maximum Ascending Subarray Sum (Python)
·
카테고리 없음
난이도: Easy문제 설명Given an array of positive integers nums, return the maximum possible sum of an ascending subarray in nums. 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 all i where l , numsi i+1. Note that a subarray of size 1 is ascending. 문제 예제Example 1:Input: nums = [10,20,30,5,10,50]Output: 65Explan..