Challenge: Find Symmetric Pairs in a List

Try to solve the Find Symmetric Pairs in a List problem.

We'll cover the following

Statement

Given a list 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 list.

Constraints:

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

  • nums[i].length ==2== 2

  • 105-10^5\leq nums[i][1] 105\leq 10^5

  • 105-10^5\leq nums[i][2] 105\leq10^5

Examples

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.