Skip to content

Commit 6a58ec1

Browse files
authored
Create README.md
1 parent a5f2e74 commit 6a58ec1

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Binary_Search_Tree/README.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)
2+
3+
# Binary Search Tree
4+
- Differ from a regular Binary Tree because of one key property: Nodes must be arranged in order
5+
- the node's left subtree must have values less than the node
6+
- the node's right subtree must have values greater than the node
7+
- this is going based on that every value in the BST must be unique
8+
9+
# Functions Implemented
10+
- Init
11+
- tree = BST(1,None,None) _creates a tree with one node_
12+
- A basic constructor that creates a BST with three parameters
13+
- BST(value,left_subtree,right_subtree)
14+
- Add
15+
- tree.add(4) _adds 4 to our previous tree created, giving a right child_
16+
- Maintains BST properties by adding to either subtree depending on the value
17+
- returns a string telling if insertion was or wasn't successful
18+
- Remove
19+
- tree.remove(1) _removes 1 from our current tree, resulting 4 to be the sole node_
20+
- Maintains BST properties by restructuring the tree when we remove the value
21+
- returns a string telling if deletion was or wasn't successful
22+
# Author
23+
[Tomas Urdinola](https://github.com/tomurdi)

0 commit comments

Comments
 (0)