摘要: 动态规划属于技巧性比较强的题目,如果看到过原题的话,对解题很有帮助 55. Jump Game Given an array of non-negative integers, you are initially positioned at the first index of the array. 阅读全文
posted @ 2016-12-28 23:23 Gryffin 阅读(386) 评论(0) 推荐(0) 编辑
摘要: 一般用dfs来做 最简单的一种: 17. Letter Combinations of a Phone Number Given a digit string, return all possible letter combinations that the number could represe 阅读全文
posted @ 2016-12-28 12:12 Gryffin 阅读(1604) 评论(0) 推荐(0) 编辑
摘要: 需要注意overflow,特别是Integer.MIN_VALUE这个数字。 需要掌握二分法。 不用除法的除法,分而治之的乘方 2. Add Two Numbers You are given two linked lists representing two non-negative number 阅读全文
posted @ 2016-12-28 11:13 Gryffin 阅读(701) 评论(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-12-28 10:34 Gryffin 阅读(235) 评论(0) 推荐(0) 编辑