摘要:
There are a row of n houses, each house can be painted with one of the k colors. The cost of painting each house with a certain color is different. Yo 阅读全文
摘要:
There are a row of n houses, each house can be painted with one of the three colors: red, blue or green. The cost of painting each house with a certai 阅读全文
摘要:
Given an integer n, generate all structurally unique BST's (binary search trees) that store values 1 ... n. 题意: 给定n个节点,列举可形成的不同的BST集合 思路: 跟 [leetcode] 阅读全文
摘要:
Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n? Input: 3 Output: 5 Explanation: Given n = 3, there are a 阅读全文