One more implementation of an AVL tree and union–find data structure for a school project.
Bazar file shows an example to use our two data structures. Rebuild book chapters from a dictionnery. If two pages have k same shared word, then they are in the same chapter.
Assuming you're ruuning an unix system with java, javac and make installed.
$ make
$ java -jar Bazar.jar <k> <dictionnary> <page1> <page2> ...