摘要:
Given a set of distinct integers,S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not co... 阅读全文
posted @ 2014-11-16 22:03
higerzhang
阅读(973)
评论(0)
推荐(0)
摘要:
给定n和k,从1到n中选k个数,存到结果中。其实就是组合问题。例如Ifn= 3, k = 2, 结果是 {1,2], [1,3], [2,3] };思路:利用回溯法。class Solution {public: void dfs77(vector > &ans, vector subans,... 阅读全文
posted @ 2014-11-16 21:26
higerzhang
阅读(575)
评论(0)
推荐(0)
摘要:
给定两个串,S和T,在S中找到包含T的最短子串,如果不能包含,返回空字符。Given a string S and a string T, find the minimum window in S which will contain all the characters in T in compl... 阅读全文
posted @ 2014-11-16 00:56
higerzhang
阅读(272)
评论(0)
推荐(0)
浙公网安备 33010602011771号