- Name: K.Keeththigan
- Index Number: 23000937
- Registration Number: 2023/cs/093
- Email: 2023cs093@stu.ucsc.cmb.ac.lk
Tested on Linux: Yes, the code was tested and successfully ran on Pop OS.
How to execute the program:
-
Run the following command to compile the code:
make
-
Run the program with:
make run
-
To remove the compiled files, run:
make clean
- The program reads words from the file
words.txtand constructs a Binary Search Tree (BST) based on these words. - The program outputs the tree structure, size, height, maximum value, minimum value, and the mirror image of the tree.
- Ensure
words.txtexists in the same directory as the executable to avoid file reading issues. - Ensure data in 'words.txt' enters in below format
Cat
Dog
Rat
Bat
Bag
Nut
Mug
Cup
Kid
Dig