-
Notifications
You must be signed in to change notification settings - Fork 0
Home
DJTojiMiko edited this page Dec 11, 2020
·
2 revisions
The goal of the program is to take any random amount of numbers, be able to sort them, and add insert them into a binary search tree data structure.
The program creates a class BSTree, the tree, which is comprised of a smaller class BSTreeNode. Whenever a number is input, a new node is made with the value of the input. The node then goes through a binary comparison algorithm to determine where in the tree the node will be placed. The program also has a print function implemented to print out an archaic version of what the graph would look like, showing nodes connected to each other as their values with two hyphens in between on a line and singular nodes as just the value on the printed line.
- Most current version of a g++/MinGW compiler installed and setup
- If on a Windows machine, recommended to use recent build of Ubuntu
- On Terminal(Mac/Linux) or Ubuntu(Windows), navigate to directory of code
- Type 'make' and hit 'Enter'
- After compiling the program, type './output'
- Program will run