You are viewing a single comment's thread. Return to all comments →
is something wrong with test case 5
HashSet<String> set=new HashSet<>(t); for(int i=0;i<t;i++){ if(set.add((pair_left[i] + "#" + pair_right[i]))){ System.out.println(set.size()); }else{ System.out.println(set.size()); } }
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Java Hashset
You are viewing a single comment's thread. Return to all comments →
is something wrong with test case 5