Problem Brief
Find Number of Perfect Pairs
OA
Given an array, find the number of perfec pairs.
(x, y) is a perfect pair if satisfies:
1Example 1
Input
arr = [2, 5, -3]
Output
2
Explanation
out of (2, 5) , (5, -3) and (2, -3), (2, -3) and (5, -3) satisfy both the conditions. Therefore, the output is 2.