Skip to content

Commit 11ef12e

Browse files
committed
update: isEmpty()
1 parent 3475013 commit 11ef12e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/_DataStructures_/Trees/BST/index.js

+4
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ class BinarySearchTree {
8282
}
8383
return false;
8484
}
85+
86+
isEmpty() {
87+
return this.root === null;
88+
}
8589
}
8690

8791
// const bst = new BinarySearchTree(6);

0 commit comments

Comments
 (0)