摘要:
Givenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique BST's.1 3 3 2 1 \ / / / \ \ 3 2 1 1 3 2 / / \ \ 2 1 ... 阅读全文
posted @ 2014-03-10 17:07
七年之后
阅读(162)
评论(0)
推荐(0)
摘要:
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete at mosttwotransactions.Note:You may not engage in multiple transactions at the same time (ie, you must sell the stock before you buy again).Have you be 阅读全文
posted @ 2014-03-10 12:18
七年之后
阅读(175)
评论(0)
推荐(0)

浙公网安备 33010602011771号