上一页 1 ··· 95 96 97 98 99 100 101 102 103 ··· 114 下一页
摘要: https://leetcode.com/problems/product-of-array-except-self/#/description 在第一个循环中,记录当前的索引左侧的数字乘积,和当前的索引右侧的数字乘积。然后两部分乘积相乘,这样的思路比较简单,但是时间复杂度是O(n*n)。 本题的解 阅读全文
posted @ 2017-05-09 18:31 Sempron2800+ 阅读(136) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/single-number-iii/#/description 阅读全文
posted @ 2017-05-09 16:36 Sempron2800+ 阅读(102) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/sort-characters-by-frequency/#/description 补充一个python的实现: 阅读全文
posted @ 2017-05-09 16:12 Sempron2800+ 阅读(151) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/minimum-moves-to-equal-array-elements-ii/#/description 阅读全文
posted @ 2017-05-09 16:05 Sempron2800+ 阅读(132) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/subtree-of-another-tree/#/description 补充一个使用python的实现,思路就是使用二叉树的先序遍历,将节点和空节点存储到字符串中,然后比较t是否是s的字串。 执行效率还是比较高的。 再补充一个双层递归的 阅读全文
posted @ 2017-05-09 13:10 Sempron2800+ 阅读(200) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/reshape-the-matrix/#/description 阅读全文
posted @ 2017-05-09 11:59 Sempron2800+ 阅读(143) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/distribute-candies/#/description 阅读全文
posted @ 2017-05-09 11:50 Sempron2800+ 阅读(124) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/string-to-integer-atoi/#/description 补充一个python的实现: 阅读全文
posted @ 2017-05-08 10:24 Sempron2800+ 阅读(147) 评论(0) 推荐(0) 编辑
摘要: C#版: public class Solution { public string Convert(string s, int numRows) { char[] c = s.ToArray(); int len = c.Length; StringBuilder[] sb = new Strin 阅读全文
posted @ 2017-05-06 18:35 Sempron2800+ 阅读(128) 评论(0) 推荐(0) 编辑
摘要: public class Solution { private int lo, maxLen; public String LongestPalindrome(String s) { int len = s.Length; if (len < 2) return s; for (int i = 0; 阅读全文
posted @ 2017-05-04 22:19 Sempron2800+ 阅读(222) 评论(0) 推荐(0) 编辑
上一页 1 ··· 95 96 97 98 99 100 101 102 103 ··· 114 下一页