cswork / OA打开练习工作台

LinkedInOA #2

Find Number of Perfect Pairs

估计中等评测数据准备中,可先阅读题面

考点(AI 标注)双指针滑窗二分查找位运算

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