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.
- Prepare
- Java
- Data Structures
- Java Hashset
- Discussions
Java Hashset
Java Hashset
Sort by
recency
|
375 Discussions
|
Please Login in order to post a comment
Here is my code that it can pass 5 test cases. I'm really disappointed of this problem. As you can see the problem tell us that "That also implies (a, b) is not same as (b, a)". But when you code with that constraint you can't pass test case 5. This makes me watse of time. So after doing this problem i gain experience that after 30 minutes if you can't pass all test cases just go to disussions and see how people solve the problem.
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.
public class Solution {
}
is something wrong with test case 5