Skip to content

Commit

Permalink
Update BinarySearchTree.js
Browse files Browse the repository at this point in the history
  • Loading branch information
JaapvanEkris authored Nov 28, 2023
1 parent 6af6db1 commit 8009259
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/engine/utils/BinarySearchTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function createLabelledBinarySearchTree () {
return countNumberOfValuesAboveInTree(currentTree.leftNode, testedValue) + countNumberOfValuesAboveInTree(currentTree.rightNode, testedValue) + 1
} else {
// currentTree.value < testedValue, so we need to find values from the right branch
return pushInTree(currentTree.rightNode, testedValue)
return countNumberOfValuesAboveInTree(currentTree.rightNode, testedValue)
}
}
}
Expand Down

0 comments on commit 8009259

Please sign in to comment.