Number Of Good Pairs Leetcode Solution Extension