Strengthen isBinarySearchTree test (#39982)
This commit is contained in:
@ -25,7 +25,7 @@ In this challenge, you will create a utility for your tree. Write a JavaScript m
|
|||||||
```yml
|
```yml
|
||||||
tests:
|
tests:
|
||||||
- text: Your Binary Search Tree should return true when checked with <code>isBinarySearchTree()</code>.
|
- text: Your Binary Search Tree should return true when checked with <code>isBinarySearchTree()</code>.
|
||||||
testString: assert((function() { var test = false; if (typeof BinarySearchTree !== 'undefined') { test = new BinarySearchTree() } else { return false; }; test.push(3); test.push(4); test.push(5); return isBinarySearchTree(test) == true})());
|
testString: assert((function() { var test = false; if (typeof BinarySearchTree !== 'undefined') { test = new BinarySearchTree() } else { return false; }; test.push(1); test.push(5); test.push(3); test.push(2); test.push(4); return isBinarySearchTree(test) == true})());
|
||||||
```
|
```
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
Reference in New Issue
Block a user