Delete the root element from the tree.

This commit is contained in:
Imre Balassa
2018-07-07 01:38:35 +02:00
parent b4969dd2b8
commit 76d17d75a8
3 changed files with 14 additions and 3 deletions

View File

@@ -57,7 +57,7 @@ public class BinaryTree {
}
public void delete(int value) {
deleteRecursive(root, value);
root = deleteRecursive(root, value);
}
private Node deleteRecursive(Node current, int value) {