LinkedInOA #2
Find Number of Perfect Pairs
Estimated MediumStatement and editorial — judging is being prepared
Topics (AI-labelled)Two PointersBinary SearchBits & Math
A perfect pair (x, y) is such
Example 1
Input:
nums = [2, -3, 5]
Output:
2
Explanation: (2, -3) and (-3, 5) are perfect pairs
Editorial
Loading solution…