A Binary Tree Visualizer implemented in C.
- Combination of Computer Graphics (CG) and Data Structures (DS) mini projects.
Code for Traversal - tree_traversal.c (Part of a Data Structures Project)
Code for Visualizer - tree_visualization.c(Part of a Computer Graphics Project)
View the complete demonstration in this LinkedIn Post or in this video.
- Displays a customized tree. (Will be using the
graphics.h
header file in C.) - Displays Pre-Order, In-Order & Post-Order traversals.
delay()
function.putpixel()
function.setcolor()
function.cleardevice()
function: Referenceitoa()
function: Referenceouttextxy()
function: Referencecircle()
function: Referencefloodfill()
function: Reference
- In-Order Traversal (LNR: Left-Node-Right)
- Pre-Order Traversal (NLR: Node-Left-Right)
- Post-Order Traversal (LRN: Left-Right-Node)
View the complete demonstration in this video.
- Download Turbo C++, since we will be using the
graphics.h
header file, which is only supported in TURBO. - Clone the repository:
git clone https://github.com/tusharnankani/binary-tree-visualizer.git
- Copy the tree_visualization.c file.
- Go to
TURBOC3 > BIN
, and paste the copied file. - Start
TURBO C++
, and open the respective file. - Compile the file using the command:
Alt + F9
- Run the file using the command:
Ctrl + F9
- Enter the root node and simultaneously start entering left and right child for the nodes.
- NOTE: For tree input take -1 as NULL.
- Displays Pre-Order, In-Order & Post-Order traversals.
- Displays tree.
- Kavya Nair
- Parth Namdev
- Tushar Nankani