posted 12 years ago
Finally figured it out.... But one last thing. Any ideas on how I can include duplicate elements? I've sorted the arrays and managed to find all common elements, but I want multiple values of a common element.
Such as, 28, which appears in only two sets but should be printed twice in the common set.
Ouput:
The following elements were common among all arrays:
[[1, 2, 3, 4, 5, 16, 22, 23, 25, 28]]
Additionally, there were a total of 40 comparisons made between the arrays.
[Ljava.lang.Comparable;@3ee284 <<<<<<---- not sure why this though??