• + 0 comments
        HashSet<String> hashSet = new HashSet<String>();
        for (int i = 0; i < t; i++) {
            String pair;
            if (pair_left[i].compareTo(pair_right[i]) < 0) {
                pair = pair_left[i] + " " + pair_right[i];
            } else {
                pair = pair_right[i] + " " + pair_left[i];
            }
    
            hashSet.add(pair);
            System.out.println(hashSet.size());
        }