This project implements a basic Binary Tree data structure in C programming language.
A binary tree is a hierarchical data structure where each node has at most two children, referred to as the left child and the right child. The topmost node in the tree is called the root.
createNode(): Creates a new node with the given value.insertNode(): Inserts a new node into the binary tree.inOrderTraversal(),preOrderTraversal(),postOrderTraversal(): Traverses the binary tree in different orders (in-order, pre-order, and post-order).deleteNode(): Deletes a node from the binary tree.
Suppose we have a binary tree representing a family tree. We can use the basic functions to:
- Create nodes for each family member, specifying their names or other relevant information.
- Insert nodes to represent parent-child relationships.
- Traverse the tree to display the family tree in different orders (e.g., in-order for alphabetical ordering of names).
- Delete nodes to update the family tree in case of marriages, divorces, or other changes.
All the code in this repo follows the betty coding style
Complilation is done with the GCC complier