After a long hiatus, I decided to start writing again as a new year resolution. I wanted to start with something easy, hence choosing the following problem. 1512. Number of Good Pairs Given an array of integers nums, return the number of good pairs. A pair (i, j) is called good if nums[i] == nums[j]…