IncredibleThings

导航

上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 28 下一页

2016年9月23日 #

LeetCode-Rotate List

摘要: Given a list, rotate the list to the right by k places, where k is non-negative. For example: Given 1->2->3->4->5->NULL and k = 2, return 4->5->1->2->3->NULL. /** * Definition for singly-linked l... 阅读全文

posted @ 2016-09-23 05:50 IncredibleThings 阅读(113) 评论(0) 推荐(0) 编辑

2016年9月3日 #

LeetCode-Group Anagrams

摘要: 二刷:注意能把containsKey用在object上的条件 阅读全文

posted @ 2016-09-03 02:58 IncredibleThings 阅读(128) 评论(0) 推荐(0) 编辑

2016年8月24日 #

LeetCode-Permutations II

摘要: Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example, [1,1,2] have the following unique permutations: [ [1,1,2], [1,2,1], [2,1,1] ]... 阅读全文

posted @ 2016-08-24 03:51 IncredibleThings 阅读(137) 评论(0) 推荐(0) 编辑

LeetCode-Permutations

摘要: Given a collection of distinct numbers, return all possible permutations. For example, [1,2,3] have the following permutations: [ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1] ] ... 阅读全文

posted @ 2016-08-24 01:07 IncredibleThings 阅读(132) 评论(0) 推荐(0) 编辑

LeetCode-Combination Sum II

摘要: Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each number in C may only be used once in the combinatio... 阅读全文

posted @ 2016-08-24 00:09 IncredibleThings 阅读(107) 评论(0) 推荐(0) 编辑

2016年8月11日 #

LeetCode-Combination Sum

摘要: 对于这种backtracking的题目, 还是得了解选择,限制,和结束的条件分别是什么。 阅读全文

posted @ 2016-08-11 06:14 IncredibleThings 阅读(160) 评论(0) 推荐(0) 编辑

2016年8月6日 #

LeetCode-Search for a Range

摘要: Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If the target is not found in ... 阅读全文

posted @ 2016-08-06 02:30 IncredibleThings 阅读(118) 评论(0) 推荐(0) 编辑

LeetCode-Search Insert Position

摘要: 二刷解法: 阅读全文

posted @ 2016-08-06 01:17 IncredibleThings 阅读(140) 评论(0) 推荐(0) 编辑

2016年7月27日 #

LeetCode-Remove Element

摘要: 注意处理while的边界问题。 阅读全文

posted @ 2016-07-27 23:54 IncredibleThings 阅读(123) 评论(0) 推荐(0) 编辑

LeetCode-Generate Parentheses

摘要: 所谓Backtracking都是这样的思路:在当前局面下,你有若干种选择。那么尝试每一种选择。如果已经发现某种选择肯定不行(因为违反了某些限定条件),就返回;如果某种选择试到最后发现是正确解,就将其加入解集所以你思考递归题时,只要明确三点就行:选择 (Options),限制 (Restraints) 阅读全文

posted @ 2016-07-27 22:19 IncredibleThings 阅读(154) 评论(0) 推荐(0) 编辑

上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 28 下一页