https://github.com/getssh/binary_trees
https://github.com/getssh/binary_trees
Last synced: 28 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/getssh/binary_trees
- Owner: getssh
- Created: 2021-12-02T21:25:10.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-02T21:43:10.000Z (over 4 years ago)
- Last Synced: 2025-02-21T19:43:39.925Z (over 1 year ago)
- Language: C
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Binary Trees
In binary tree The root/ one node
can have atmost 2 child nodes
we use this structure in this project
Basic Binary Tree
/**
* struct binary_tree_s - Binary tree node
*
* @n: Integer stored in the node
* @parent: Pointer to the parent node
* @left: Pointer to the left child node
* @right: Pointer to the right child node
*/
struct binary_tree_s
{
int n;
struct binary_tree_s *parent;
struct binary_tree_s *left;
struct binary_tree_s *right;
};
typedef struct binary_tree_s binary_tree_t;
Binary Search Tree
typedef struct binary_tree_s bst_t;
AVL Tree
typedef struct binary_tree_s avl_t;
Max Binary Heap
typedef struct binary_tree_s heap_t;