Count Nice Pairs in an Array
You are given an array nums. A pair of indices (i, j) is called nice if nums[i] + nums[j] is equal to i + j. Return the number of nice pairs in the array.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)