2021年1月10日

95. Unique Binary Search Trees II

摘要: Given an integer n, generate all structurally unique BST's (binary search trees) that store values 1 ... n. Example: Input: 3 Output: [ [1,null,3,2], 阅读全文

posted @ 2021-01-10 17:02 wsw_seu 阅读(74) 评论(0) 推荐(0) 编辑

96. Unique Binary Search Trees(dp)

摘要: Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n? Example: Input: 3 Output: 5 Explanation: Given n = 3, the 阅读全文

posted @ 2021-01-10 14:56 wsw_seu 阅读(92) 评论(0) 推荐(0) 编辑

导航