[Solved] Count Number of Bad Pairs LeetCode Contest
You are given a 0-indexed integer array nums. A pair of indices (i, j) is a bad pair if i < j and j – i != nums[j] – nums[i]. Return the total number of bad pairs in nums. Count Number of Bad Pairs LeetCode Contest Example 1: Input: nums = [4,1,3,3] Output: 5…