
算法
文章平均质量分 94
守仁
这个作者很懒,什么都没留下…
展开
-
Google Kickstart 2022 Interesting Integers Solution
If we have a function CountInterestingIntegers(N) to get the number of interesting integers between 1 and N, then the number of interesting integers between two positive integers A and B inclusively can be computed by CountInterestingIntegers(B)−CountInter翻译 2022-04-11 19:30:43 · 343 阅读 · 0 评论 -
最大子数组问题
求子数组的最大和 题目描述: 输入一个整形数组,数组里有正数也有负数。 数组中连续的一个或多个整数组成一个子数组,每个子数组都有一个和。 求所有子数组的和的最大值。要求时间复杂度为O(n)。 例如输入的数组为1, -2, 3, 10, -4, 7, 2, -5,和最大的子数组为3, 10, -4, 7, 2, 因此输出为该子数组的和18。原创 2014-10-16 19:27:01 · 453 阅读 · 0 评论