This project consists of the Java classes RBT.java and Main.java. The RBT class contains the RBT class and the RBT class, which represent the algorithm for creating the RBT.
In the class Main.java a tree based on a randomized array is built. Thereby 15 nodes from the value range 1 -100 are randomly selected and inserted into the tree.
The output is a .dot format which can be converted to a tree representation with Graphviz, a Linux tool. A total of 15 dotfiles are generated, which represent the 15 insert operations from the array.
The 15 PDF files generated with Graphviz then graphically represent the entire process of inserting the nodes.
The execution of the Java codes and the generation and merging of the PDF files can be started automatically by the added bash script. This only works if you are using a Linux or Mac based system and have the required software installed. The execution command of the Java code in the script is identical to the execution command of the Java extension of VS Code.
The workspace contains two folders by default, where:
src: the folder to maintain sourceslib: the folder to maintain dependencies
Meanwhile, the compiled output files will be generated in the bin folder by default.
