We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fbfdce0 commit 8caf3a2Copy full SHA for 8caf3a2
1 file changed
src/data-structures/tree/binary-search-tree/BinarySearchTreeNode.js
@@ -28,8 +28,10 @@ export default class BinarySearchTreeNode extends BinaryTreeNode {
28
}
29
30
if (value < this.value && this.left) {
31
+ // Check left nodes.
32
return this.left.contains(value);
33
} else if (this.right) {
34
+ // Check right nodes.
35
return this.right.contains(value);
36
37
0 commit comments