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.
This is my solution. What I like about it is that all the conditions are in one line, so it is easy remove or add to conditions in one place. Also, the problem description isn't very clear that we should return only distict values, I had to assume that from the example and then from the multiple fail test (yes you're not alone if you run into this issue)
Symmetric Pairs
You are viewing a single comment's thread. Return to all comments →
This is my solution. What I like about it is that all the conditions are in one line, so it is easy remove or add to conditions in one place. Also, the problem description isn't very clear that we should return only distict values, I had to assume that from the example and then from the multiple fail test (yes you're not alone if you run into this issue)