摘要: 这道题目的循环里面的那个递推的式子很巧妙,能够帮助循环快速收敛。 阅读全文
posted @ 2016-06-27 15:06 blcblc 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 以下这个解法也是参考了一些讨论: https://leetcode.com/discuss/110235/c-solution-using-euclidean-algorithm 还有这个解释原理的,没有看懂:https://leetcode.com/discuss/110525/a-little- 阅读全文
posted @ 2016-06-27 14:45 blcblc 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 根据上一篇文章提到的参考文档: https://leetcode.com/discuss/109749/accepted-c-codes-with-explanation-and-references 我实现的解法,用了一个sum_max,不再另设res。 27 / 27 test cases pa 阅读全文
posted @ 2016-06-27 14:22 blcblc 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 今天的一道题目: https://leetcode.com/problems/max-sum-of-sub-matrix-no-larger-than-k/ 有难度。这一类题目很有代表性。 搜到这个网址有针对一维数组的求和的按照时间复杂度一步步优化的过程,讲的很不错: http://www.cnbl 阅读全文
posted @ 2016-06-27 13:39 blcblc 阅读(974) 评论(0) 推荐(0) 编辑