...

/

Solution: Find Symmetric Pairs in an Array

Solution: Find Symmetric Pairs in an Array

Let’s solve the Find Symmetric Pairs in an Array problem.

We'll cover the following...

Statement

Given an array of pairs, nums, find all the symmetric pairsBy definition, (a, b) and (c, d) are symmetric pairs iff, a = d and b = c. from it. If no symmetric pair is found, return an empty array. The first element of each pair is guaranteed to be distinct.

The output can be in any order, and returning any one symmetric pair is acceptable.

Constraints:

  • 22 \leq nums.length 103\leq10^3 ...