Skip to content

Latest commit

 

History

59 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Binary Tree Project

This project implements a basic Binary Tree data structure in C programming language.

Overview

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.

Basic Functions

  • 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.

Use Case

Suppose we have a binary tree representing a family tree. We can use the basic functions to:

  1. Create nodes for each family member, specifying their names or other relevant information.
  2. Insert nodes to represent parent-child relationships.
  3. Traverse the tree to display the family tree in different orders (e.g., in-order for alphabetical ordering of names).
  4. Delete nodes to update the family tree in case of marriages, divorces, or other changes.

Code style

All the code in this repo follows the betty coding style

more on C binary tree

Complilation is done with the GCC complier

About

A project done to perform tasks on binary tree and binary search tree in data structures

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages