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.
There seems to be an inconsistency between the wording in the exercise and the expectation of Test Case 5, which seems to be a topic of frustration of multiple people here including myself.
This is the wording in the exercise:
Two pairs (a, b) and (c, d) are identical if a = c and b = d. That also implies (a, b) is not same as (b, a).
Based on this requirement the pair "john tom" ≠ "tom john".
However, Test Case 5 requires you that you actually treat (a, b) the same as (b, a), which is inconsistent with the wording in the exercise.
Moving forward, to provide a consistent approach either the wording in the exercise is changed or Test Case 5 is adjusted accordingly.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Join us
Create a HackerRank account
Be part of a 26 million-strong community of developers
Please signup or login in order to view this challenge
Java Hashset
You are viewing a single comment's thread. Return to all comments →
There seems to be an inconsistency between the wording in the exercise and the expectation of Test Case 5, which seems to be a topic of frustration of multiple people here including myself.
This is the wording in the exercise:
Based on this requirement the pair "john tom" ≠ "tom john".
However, Test Case 5 requires you that you actually treat (a, b) the same as (b, a), which is inconsistent with the wording in the exercise.
Moving forward, to provide a consistent approach either the wording in the exercise is changed or Test Case 5 is adjusted accordingly.