We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Basically, when you don't consider x<=y, you count one pair as two different elements
The answer requires you to find pairs.
For example,
For case x < y:
2 24 and 24 2 are two sets of X and Y values which form a symmetric pair. Then, you have to list only 2 24 in your answer and not both of these as per the question.
For case x = y:
You have to have atleast two unique sets of X and Y values present in the "Functions" table to list one of these sets in your answer.
If you only one set of X and Y with X = Y, although mathematically it'd form a symmetric relation but there is no other set here with which this current set is forming a pair.
I hope this made it more clear.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Symmetric Pairs
You are viewing a single comment's thread. Return to all comments →
Basically, when you don't consider x<=y, you count one pair as two different elements The answer requires you to find pairs. For example, For case x < y: 2 24 and 24 2 are two sets of X and Y values which form a symmetric pair. Then, you have to list only 2 24 in your answer and not both of these as per the question.
For case x = y: You have to have atleast two unique sets of X and Y values present in the "Functions" table to list one of these sets in your answer.
If you only one set of X and Y with X = Y, although mathematically it'd form a symmetric relation but there is no other set here with which this current set is forming a pair.
I hope this made it more clear.