4

I searched for a native implementation of the disjoint-set data structure in Java. But I didn't find one, only in external libraries.

Did I miss it or does it actually not exist?

Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
Moritz Groß
  • 1,352
  • 12
  • 30

1 Answers1

0

If there was an implementation of the disjoint-set data structure, it would likely be located in the java.util package. Sets are included, but not disjoint-sets: https://docs.oracle.com/javase/8/docs/api/java/util/package-summary.html.

The closest I found was the disjoint method in the java.util.collections class: https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/util/Collections.html#disjoint%28java.util.Collection,java.util.Collection%29

Brian_E
  • 34
  • 2