Learn
Practice
Newsletter
Resources
Animations
New
F
Toggle theme
0
F
0
Toggle menu
← Back to All Animations
Subarray Sums Divisible by K
Bookmark
Input
Classic
Simple
All Multiples
Custom
nums
=
[4, 5, 0, -2, -3, 1]
,
k
=
5
k =
5
count =
0
0
1
2
3
4
5
4
5
0
-2
-3
1
algo
master
.
io
Step:
Start: count subarrays whose sum is divisible by k
0 / 20
Input
Classic
Simple
All Multiples
Custom
nums
=
[4, 5, 0, -2, -3, 1]
,
k
=
5
0 / 20
k =
5
count =
0
0
1
2
3
4
5
4
5
0
-2
-3
1
algo
master
.
io
Step:
Start: count subarrays whose sum is divisible by k