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