A binary search tree made in Java that manipulates integer values. In addition to conventional insertion, removal and search operations, the tree also has additional methods for better analysis of the structure.
- Download JDK by clicking here.
- Configure JDK on your machine.
- Download this project and open the terminal inside the
srcfolder. - With the terminal open, run in sequence the following commands:
javac TreeProgram.java
java TreeProgram
The program has a test file. Inside the src folder you will find a file called testFile.txt, in
it you can write one command per line so that the program starts and executes each command
automatically without the need to enter the commands manually.
โ ๏ธ The program will only recognize the test file if it is named "testFile.txt"
โ ๏ธ The file must be in thesrcfolder
Test File Exemple
Create a testFile.txt file with the lines below
insert 22
insert 16
insert 24
insert 33
complete
full
nth 3
insert 36
full
preorder
remove 50
insert 15
insert 39
remove 32
position 15
insert 39
nth 5
median
mean 20
search 36
insert 25
median
print 1
print 2
As mentioned, the program has several other functions in addition to the basic insertion, removal and search. the program works either by manually receiving the functions or with a test file, below are the available functions:










