Learn
Practice
Newsletter
Resources
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
Number of Good Pairs
Bookmark
Input
Example 1
Example 2
Example 3
Custom
nums
=
[1, 2, 3, 1, 1, 3]
1
2
3
1
1
3
0
1
2
3
4
5
Hash Map
count = 0
algo
master
.
io
Step:
Find number of good pairs using hash map to track frequencies
0 / 17
Input
Example 1
Example 2
Example 3
Custom
nums
=
[1, 2, 3, 1, 1, 3]
0 / 17
1
2
3
1
1
3
0
1
2
3
4
5
Hash Map
count = 0
algo
master
.
io
Step:
Find number of good pairs using hash map to track frequencies