IncredibleThings

导航

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) 编辑

LeetCode-4Sum

摘要: Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target. Note: The solution se... 阅读全文

posted @ 2016-07-27 08:10 IncredibleThings 阅读(105) 评论(0) 推荐(0) 编辑