Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
cty12 committed Sep 13, 2023
1 parent 08686f2 commit e9893d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lectures/Sep-13.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ What is the time complexity? $O(h)$, where $h$ is the height of the tree.
Insert into a binary search tree using the `find` method. Return the inserted node,
or null if the key is already in the tree.

Solution:

<details>
<summary>Solution:</summary>
```java
public Node<K> insert(K key) {
Node<K> n = find(key, root, null);
Expand All @@ -154,6 +154,8 @@ Solution:
return null;
}
```
</details>


## `remove` method of `BinarySearchTree`

Expand Down

0 comments on commit e9893d5

Please sign in to comment.