235. Lowest Common Ancestor of a Binary Search Tree
时间复杂度:O(n)
Source Code
1 | // Runtime: 168 ms, faster than 5.31% of JavaScript online submissions for Lowest Common Ancestor of a Binary Search Tree. |
Test Cases
1 | test("test1", ()=>{ |
236. Lowest Common Ancestor of a Binary Tree
时间复杂度:O(n)
Source Code
1 | // Runtime: 84 ms, faster than 22.42% of JavaScript online submissions for Lowest Common Ancestor of a Binary Tree. |
Test Cases
1 | test("test1", ()=>{ |