Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaydattpatel/binary-tree
Different Operation on Binary Tree Structure
https://github.com/jaydattpatel/binary-tree
bfs-search binary-tree breadth-first-search c c-language cplusplus cpp depth-first-search dfs-search inorder-traversal levelorder-traversal online-manipal-bca postorder-traversal preorder-traversal tree-height
Last synced: about 2 months ago
JSON representation
Different Operation on Binary Tree Structure
- Host: GitHub
- URL: https://github.com/jaydattpatel/binary-tree
- Owner: jaydattpatel
- License: mit
- Created: 2023-03-28T11:42:31.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-01T15:59:04.000Z (5 months ago)
- Last Synced: 2024-08-01T17:59:04.120Z (5 months ago)
- Topics: bfs-search, binary-tree, breadth-first-search, c, c-language, cplusplus, cpp, depth-first-search, dfs-search, inorder-traversal, levelorder-traversal, online-manipal-bca, postorder-traversal, preorder-traversal, tree-height
- Language: C++
- Homepage:
- Size: 12.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Binary-Tree
Different Operation on Binary Tree Structure
CREATE BINARY TREE
(1,A)
_______________|________________
| |
(2,B) (3,C)
________|________ ________|________
| | | |
(4,D) (5,E) (6,F) (7,G)
___|___ ___|___ ___|___ ___|___
| | | | | | | |
(8,H) (9,I) (10,J) (11,K) (12,L) (13,M) (14,N) (15,O)
Inorder is: [4, D] [2, B] [5, E] [1, A] [6, F] [3, C] [7, G]Preorder is: [1, A] [2, B] [4, D] [5, E] [3, C] [6, F] [7, G]
Postorder is: [4, D] [5, E] [2, B] [6, F] [7, G] [3, C] [1, A]
BFS levelorder is: [1, A] [2, B] [3, C] [4, D] [5, E] [6, F] [7, G]
Height of Tree : 3
DFS levelorder is: [4, D] [5, E] [6, F] [7, G] [2, B] [3, C] [1, A]
Print value of level:
Level-1: [1, A]
Level-2: [2, B] [3, C]
Level-3: [4, D] [5, E] [6, F] [7, G]