We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 22787dd commit 312e43aCopy full SHA for 312e43a
src/_DataStructures_/Trees/BST/index.js
@@ -32,11 +32,11 @@ class BinarySearchTree {
32
/** returning an array so as to make testing easy */
33
let arr = [];
34
if (root === null) return [];
35
- // eslint-disable-next-line no-console
36
arr.push(root.value);
37
38
const left = this.preorder(root.leftChild);
39
arr = [...arr, ...left];
+
40
const right = this.preorder(root.rightChild);
41
arr = [...arr, ...right];
42
return arr;
0 commit comments