Learn
Practice
Newsletter
Resources
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
Maximum Sum of Distinct Subarrays With Length K
Bookmark
Input
Example 1
All Same
All Distinct
Duplicates Then Distinct
Custom
nums
=
[1, 5, 4, 2, 9, 9, 9]
,
k
=
3
1
5
4
2
9
9
9
windowSum = 0
maxSum = 0
algo
master
.
io
Step:
Start of algorithm
0 / 15
Input
Example 1
All Same
All Distinct
Duplicates Then Distinct
Custom
nums
=
[1, 5, 4, 2, 9, 9, 9]
,
k
=
3
0 / 15
1
5
4
2
9
9
9
windowSum = 0
maxSum = 0
algo
master
.
io
Step:
Start of algorithm