解法一
时间复杂度:O(n)
1 | // Runtime: 64 ms, faster than 73.11% of JavaScript online submissions for Validate Binary Search Tree. |
解法二
时间复杂度:O(n)
1 | // Runtime: 68 ms, faster than 50.77% of JavaScript online submissions for Validate Binary Search Tree. |
Test Cases
1 | test("test1", ()=>{ |