上一页 1 ··· 97 98 99 100 101 102 103 104 105 ··· 114 下一页
摘要: https://leetcode.com/problems/arithmetic-slices/#/description 补充一个java的实现: 解释: dp[i] 表示以 A[i] 为结尾的等差递增子区间的个数。 因为递增子区间不一定以最后一个元素为结尾,可以是任意一个元素结尾,因此需要返回 阅读全文
posted @ 2017-04-29 23:57 Sempron2800+ 阅读(106) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/find-bottom-left-tree-value/#/description 阅读全文
posted @ 2017-04-29 23:42 Sempron2800+ 阅读(103) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/counting-bits/#/description 另一个版本,246ms: 补充一个使用动态规划思想的代码,使用python实现: 阅读全文
posted @ 2017-04-29 22:58 Sempron2800+ 阅读(126) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/battleships-in-a-board/#/description 阅读全文
posted @ 2017-04-28 23:14 Sempron2800+ 阅读(83) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/complex-number-multiplication/#/description 阅读全文
posted @ 2017-04-28 14:48 Sempron2800+ 阅读(94) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/encode-and-decode-tinyurl/#/description 阅读全文
posted @ 2017-04-28 14:24 Sempron2800+ 阅读(128) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public void reverse(int[] nums, int start, int end) { while (start < end) { int temp = nums[start]; nums[start] = nums[end]; n 阅读全文
posted @ 2017-04-26 21:45 Sempron2800+ 阅读(124) 评论(0) 推荐(0) 编辑
摘要: /* The isBadVersion API is defined in the parent class VersionControl. bool IsBadVersion(int version); */ public class Solution : VersionControl { pub 阅读全文
posted @ 2017-04-26 20:39 Sempron2800+ 阅读(87) 评论(0) 推荐(0) 编辑
摘要: public class Solution { private string Convert(int k) { var s = ""; switch (k) { case 1: s = "A"; break; case 2: s = "B"; break; case 3: s = "C"; brea 阅读全文
posted @ 2017-04-26 19:51 Sempron2800+ 阅读(106) 评论(0) 推荐(0) 编辑
摘要: public class Solution { Stack<char> S = new Stack<char>(); Queue<char> Q = new Queue<char>(); public bool IsPalindrome(string s) { if (s.Length == 0) 阅读全文
posted @ 2017-04-26 19:16 Sempron2800+ 阅读(131) 评论(0) 推荐(0) 编辑
上一页 1 ··· 97 98 99 100 101 102 103 104 105 ··· 114 下一页