摘要: Given an unsorted array of integers, find the length of longest increasing subsequence. Example: Input: [10,9,2,5,3,7,101,18] Output: 4 Explanation: T 阅读全文
posted @ 2019-09-28 09:55 Schwifty 阅读(136) 评论(0) 推荐(0)
摘要: You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you nee 阅读全文
posted @ 2019-09-28 04:57 Schwifty 阅读(165) 评论(0) 推荐(0)
摘要: Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n? Example: 自底向上的DP。递推公式下图可以理解,因为F(i, n)表示n个数字且以第i个为根的bst个数, 阅读全文
posted @ 2019-09-28 02:49 Schwifty 阅读(159) 评论(0) 推荐(0)