2010年12月16日

摘要: 其实题目很简单,就是计算一个整数数组中,连续的最大子数组。一开始想到肯定是个O(n*n)的算法:maxSectionGood后来使用递归O(n*log(n)):maxSectionExcellent最经典的是最后一个算法,提升到了O(n):maxSectionPrefectGoogle 笔试题:input: an array of int which represent a binary number the bit is 1output: the count of 1 triple of the numberinput: an array of intoutput: the max sum 阅读全文

posted @ 2010-12-16 10:36 Teddy Yan 阅读(231) 评论(0) 推荐(0) 编辑


Copyright © 2024 Teddy Yan
Powered by .NET 8.0 on Kubernetes