Binary Trees

Left & Right

As part of our final Algorithms III class project we had to create two C programs about Binary Trees. the perpes of the project is to see if the student can apply binary trees as a data structure, and try to find the best sorting algorithms that can be applied to binary trees in general and compare them. we also apply AVL trees in this project where we are asked in the first part to write a program that determines if a given tree is AVL or not and if not it fixes the tree and perform preorder, inorder and postorder traverses on the AVL tree.

The second program has many basic but important functions of binary trees, and the main goal as said before is to make sure we understood the main concepts of the subject, here are some of the functions the program can do:

  1. Create a new empty tree.
  2. Create a node.
  3. Make a node as root node.
  4. Make a node as left child.
  5. Make a node as right child.
  6. Delete selected node.
  7. Is the node a root or left or right node.
  8. Check if the node has children or not.
  9. Give the value of the selected node.
  10. Check if the slected node is empty.
  11. Show the tree.
for the source code and other details please click here to get to my gitgub repo.