摘要: 题目如下: Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n? Example: 解题思路:一开始我觉得递归就行了,根节点可以填入的数为[1,2,3....n],如果 阅读全文
posted @ 2019-01-04 16:44 seyjs 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 题目如下: Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively. Below is one possible repres 阅读全文
posted @ 2019-01-04 13:27 seyjs 阅读(132) 评论(0) 推荐(0) 编辑