You are viewing a single comment's thread. Return to all comments →
A simple solution
HashSet<String> pairs = new HashSet<String>(t); for(int i = 0; i < t; i++) { pairs.add("(" + pair_left[i] + ", " + pair_right[i] + ")" ); System.out.println(pairs.size()); }
Java Hashset
You are viewing a single comment's thread. Return to all comments →
A simple solution