代码改变世界

阅读排行榜

[LeetCode] 105. Construct Binary Tree from Preorder and Inorder Traversal_Medium tag: Tree Traversal

2018-07-24 04:11 by Johnson_强生仔仔, 272 阅读, 收藏,
摘要: Given preorder and inorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. For example, 阅读全文

[LeetCode] 40. Combination Sum II_Medium tag: backtracking

2019-05-25 22:55 by Johnson_强生仔仔, 271 阅读, 收藏,
摘要: Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numb 阅读全文

[LeetCode] Template to N Sum for (LC 15. 3Sum, LC 18. 4Sum)(N>2)

2018-06-21 04:56 by Johnson_强生仔仔, 271 阅读, 收藏,
摘要: 思路为将N sum 转换为N-1 Sum, 直到转换为 2 Sum. 不过最开始就已经将nums sort一下, 然后再处理. 阅读全文

[LeetCode] 46. Permutations_Medium tag: DFS, backtracking

2019-05-24 09:27 by Johnson_强生仔仔, 269 阅读, 收藏,
摘要: Given a collection of distinct integers, return all possible permutations. Example: Input: [1,2,3] Output: [ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1, 阅读全文

[LeetCode] 153. Find Minimum in Rotated Sorted Array_Medium tag: Binary Search

2018-08-31 06:53 by Johnson_强生仔仔, 269 阅读, 收藏,
摘要: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). F 阅读全文
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 78 下一页