Skip to content

Graphical demonstration of standard binary tree operations.

Notifications You must be signed in to change notification settings

ziyadtalha/Binary-Tree-Visualiser

Repository files navigation

The following methods are implemented:

  1. Create a binary tree. The height of the root rectangle is input by the user.
  2. Delete a node and its corresponding sub-trees. As input the user has to enter the node number of the tree.
  3. Insert a node in the tree. As input the user has to enter the node number of leaf node.
  4. Draw all the nodes of the tree as rectangles. This performs a level by level traversal of the tree.
  5. Compute the height of the tree.
  6. Input a node number from the user and display the rectangle of that node. This is equivalent to searching for a node in the tree.
  7. Draw the rectangles contained in only the leaf nodes of the tree.

Compile using:

g++ main.cpp myconsole.cpp rectangles.cpp mygraphics.cpp -o main.exe -L MinGW\lib -lgdi32

tree

About

Graphical demonstration of standard binary tree operations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published