Solution: Number of Good Pairs
Let's solve the Number of Good Pairs problem using the Knowing What to Track pattern.
We'll cover the following...
We'll cover the following...
Statement
Given an array of integers nums, return the total count of good pairs.
A pair (i, j) is considered good if nums[i] == nums[j] and i j.
Constraints: