We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 13d6319 commit 29626b4Copy full SHA for 29626b4
my-submissions/e1800.py
@@ -0,0 +1,13 @@
1
+class Solution:
2
+ def maxAscendingSum(self, nums: List[int]) -> int:
3
+ curr = []
4
+ summ = 0
5
+ maxx = 0
6
+ for num in nums :
7
+ if curr and curr[-1] >= num :
8
+ maxx = max(maxx, summ)
9
10
11
+ curr.append(num)
12
+ summ += num
13
+ return max(maxx, summ)
my-submissions/m2393.py
@@ -0,0 +1,14 @@
+ def countSubarrays(self, nums: List[int]) -> int:
+ output = 0
+ indx = 0
+
+ output += len(curr)
+ indx += 1
14
+ return output
0 commit comments