Problem 95: Unique Binary Search Trees II
https://leetcode.com/problems/unique-binary-search-trees-ii/
思路
用 divide and conquer 的思路来考虑这道题。对于每一个 node 都可以分成左子树和右子树,recursion,然后连接到当前 node 然后加入 list 中
Last updated
Was this helpful?
https://leetcode.com/problems/unique-binary-search-trees-ii/
用 divide and conquer 的思路来考虑这道题。对于每一个 node 都可以分成左子树和右子树,recursion,然后连接到当前 node 然后加入 list 中
Last updated
Was this helpful?