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.
I think the solution has an error. In set theory, the elements are unordered, i.e. John and Anne are the same pair as Anne and John. According to test case 2, e.g. cases: kg ni and ni kg are two different pairs. In my solution, in test 2 I have 975 different pairs, in their solution there are 990.
Java Hashset
You are viewing a single comment's thread. Return to all comments →
I think the solution has an error. In set theory, the elements are unordered, i.e. John and Anne are the same pair as Anne and John. According to test case 2, e.g. cases: kg ni and ni kg are two different pairs. In my solution, in test 2 I have 975 different pairs, in their solution there are 990.
If you find an error, let me know. My solution:
import java.util.HashSet; import java.util.Scanner;
public class SetOfSets { public static void main(String[] args) { Scanner scanner = new Scanner(System.in);
}