摘要: Given a set of distinct integers, nums, return all possible subsets. Note: The solution set must not contain duplicate subsets. For example, If nums = 阅读全文
posted @ 2017-04-14 21:07 aiterator 阅读(89) 评论(0) 推荐(0) 编辑
摘要: Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. For example, If n = 4 and k = 2, a solution is: [ [2,4], [3, 阅读全文
posted @ 2017-04-14 20:57 aiterator 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 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). For example, S = "ADOBECO 阅读全文
posted @ 2017-04-14 20:41 aiterator 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: + Integers in each row are sorted 阅读全文
posted @ 2017-04-14 19:35 aiterator 阅读(84) 评论(0) 推荐(0) 编辑