Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5d5bcdc

Browse files
Updated README
1 parent 84b1f05 commit 5d5bcdc

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

‎Binary Trees/README.md‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Binary Trees
2+
3+
## 1. Binary Tree:
4+
5+
This [code](BinaryTree.py) shows how to create a Binary Tree using a Menu Driven approach.
6+
7+
Following are the operations I have performed on Binary Trees:
8+
9+
- Creation of Root node `createRoot()` followed by creation of whole tree `createTree()`. It uses **Recursive** approach to create the tree.
10+
- Traversing the tree:
11+
1. Inorder -- `inorder()`
12+
2. Preorder -- `preorder()`
13+
3. Postorder -- `postorder()`
14+
4. Level-order -- `levelorder()`
15+
- Counting height of the tree using `height()`.
16+
17+
## 2. Binary Search Tree:
18+
19+
This [code](BinarySearchTree.py) shows how to create a Binary Search Tree using a Menu Driven approach. I have implemented operations using both Iterative and Recurise method.
20+
21+
Following are the operations I have performed on Binary Search Tree:
22+
23+
- Add single/multiple item(s) using `insertion_iterative()` (Iterative) and `insertion_recursive()` (Recursive).
24+
25+
- Search for an item using `search_iterative()` (Iterative) and `search_recursive()` (Recursive).
26+
27+
- Deletion of a node using `delete()`:
28+
1. Leaf node.
29+
2. Node with one subtree.
30+
3. Node with two subtree.
31+
32+
- I have used `inorder()` function from the Binary Tree code mentioned above to display the Binary Search Tree.

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ Find the detailed description on operations performed [here.](Linked%20List/)
3535

3636
### 4. Binary Trees (using Linked List)
3737

38+
Find the detailed description on operations performed [here.](Binary%20Trees/)
39+
3840
1. [Binary Tree](Binary%20Trees/BinaryTree.py)
3941
2. [Binary Search Tree](Binary%20Trees/BinarySearchTree.py)
4042

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /