Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const bst = new AvlTree();

### .insert(key, value)

inserts a node with key/value into the tree. Inserting an node with existing key, would update the existing node's value with the new inserted one. AVL tree will rotate nodes properly if the tree becomes unbalanced with the insertion.
inserts a node with key/value into the tree. Inserting an node with existing key, would update the existing node's value with the new one. AVL tree will rotate nodes properly if the tree becomes unbalanced during insertion.

<table>
<tr><th align="center" colspan="2">params</th></tr>
Expand Down Expand Up @@ -378,7 +378,7 @@ bst.traversePostOrder((node) => console.log(node.getKey()));
```

### .remove(key)
removes a node from the tree by its key. AVL tree will rotate nodes properly if the tree becomes unbalanced with the deletion.
removes a node from the tree by its key. AVL tree will rotate nodes properly if the tree becomes unbalanced during deletion.

<table>
<tr><th align="center" colspan="3">params</th></tr>
Expand Down Expand Up @@ -431,7 +431,7 @@ console.log(bst.root()); // null
### BinarySearchTreeNode

#### .getKey()
returns the node's key that is used to compare with other.
returns the node's key that is used to compare with other nodes.

<table>
<tr><th>return</th></tr>
Expand Down