Count Nice Pairs

Count the number of pairs of indices (i, j) with i < j such that nums[i] + rev(nums[j]) == nums[j] + rev(nums[i]), where rev(x) is the decimal reverse of x (ignoring leading zeros). Return the count modulo 10^9 + 7.

Examples
Input: [42,11,1,97]
Output: 2
Hints

Count Nice Pairs

Count the number of pairs of indices `(i, j)` with `i < j` such that `nums[i] + rev(nums[j]) == nums[j] + rev(nums[i])`, where `rev(x)` is the decimal reverse of `x` (ignoring leading zeros). Return the count modulo 10^9 + 7.