摘要: 1 package test; 2 3 import java.util.Scanner; 4 5 public class Main { 6 7 public static void main(String[] args) { 8 // TODO Auto-generated method stub 9 Scanner in = ... 阅读全文
posted @ 2016-08-22 11:16 Miller1991 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example,[1,1,2] have the following unique pe 阅读全文
posted @ 2016-07-15 09:13 Miller1991 阅读(292) 评论(0) 推荐(0) 编辑
摘要: The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order,We get the following sequence 阅读全文
posted @ 2016-07-15 08:41 Miller1991 阅读(341) 评论(0) 推荐(0) 编辑
摘要: Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words. For 阅读全文
posted @ 2016-07-14 20:15 Miller1991 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 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 @ 2016-07-14 11:34 Miller1991 阅读(266) 评论(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: 阅读全文
posted @ 2016-07-14 11:00 Miller1991 阅读(172) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The lowes 阅读全文
posted @ 2016-07-14 09:29 Miller1991 阅读(245) 评论(0) 推荐(0) 编辑
摘要: Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the 阅读全文
posted @ 2016-07-13 20:51 Miller1991 阅读(192) 评论(0) 推荐(0) 编辑
摘要: Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeat 阅读全文
posted @ 2016-07-13 20:30 Miller1991 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 whic 阅读全文
posted @ 2016-07-13 16:41 Miller1991 阅读(197) 评论(0) 推荐(0) 编辑