
leetcode40  Combination Sum II
题目Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums to target.Each number in candidates may only be used once in the combination.Note:All ...…

leetcode337  House Robber III
题目The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the "root." Besides the root, each house has one and only one parent house. After a tour, the smart thief realized that "all houses i...…

leetcode39  Combination Sum
题目Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums to target.The same repeated number may be chosen from candidates unlimit...…

leetcode213  House Robber II
题目You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this place are arranged in a circle. That means the first house is the neighbor of the last one. Meanwhile, adja...…

leetcode198  House Robber I
题目u are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security system connected and it will au...…

leetcode265  Paint House II (hard)
题目现在题目变了，变成了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. You have to paint all the houses such that no two adjacent houses have the same color.T...…

leetcode276  Paint Fence
题目意思是有一排Fence n个， k种color, 要求不能有超过三个连着的Fence有相同的color解答，用DP，假设前面2个都paint好了的话，dp[1], dp[2], 分别表示paint1和paint2的时候的方案数，那么paint第三个的时候有两种选择， 1 和它前面的color不相同，那么这时候不会有连着三个的相同，所以是(k1)*dp[2]种， 2 和它前面的color相同，这时候只需要和它前面的前面的不相同即可，是(k1)*dp[1], ...…

leetcode256  Paint House I
题目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 certain color is different. You have to paint all the houses such that no two adjacent houses have th...…

leetcode239  Sliding Window Maximum（就是maxpooling一维的那个)
题目Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves right by one position. Return the max sl...…

leetcode76  Minimum Window Substring (HARD)
题目Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).Example:Input: S = "ADOBECODEBANC", T = "ABC"Output: "BANC"Note: If there is no such window in S that covers all chara...…