You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: binary-search-tree/readme.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,15 +7,15 @@ In this section, we will be learning binary search tree datastructure.
7
7
8
8
> A Binary Search tree is a binary tree in which nodes which have lesser value are stored on the left while the nodes with higher value are stored at the right
9
9
10
-
Each tree node consists of three things they are
10
+
Each tree node consists of three things, they are
11
11
1. data
12
12
2. left - pointer to the left tree node
13
13
3. right - pointer to the right tree node
14
14
15
15
**_Data_** holds the data value of the tree node.
16
16
**_Pointer_** holds the reference to the memory location of left/right tree node.
17
17
18
-
We would discuss on the following features like
18
+
We are going to discuss on the following features like
19
19
* insert node
20
20
* remove node
21
21
* get root node
@@ -41,7 +41,7 @@ In binary search tree, we can insert the node with the following guidelines/logi
41
41
42
42
### Logic:
43
43
1. create a tree node object with the input data.
44
-
2. check if root node exists on the tree, if yes search through the root node to find the location to insert (helper method ```insertNode``` does).
44
+
2. check if root node exists on the tree. If yes, search through the root node to find the location to insert (helper method ```insertNode``` does).
45
45
3. otherwise assign the created node as tree node.
0 commit comments