![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构与算法分析
lcdxwhj2003
这个作者很懒,什么都没留下…
展开
-
最大子序列和问题的求解【原】
/** * 求最大子序列和 * @param a * @return */ public static int maxSubSum(int[] a ){ int maxSum = 0,thisSum = 0; int length = a.length; for (int i = 0; i < length; i+...原创 2011-04-04 10:29:41 · 59 阅读 · 0 评论 -
折半查找【原】
public static <AnyType extends Comparable<? super AnyType>> int binarySearch( AnyType[] a, AnyType x) { int NOT_FOUND = -1; int low = 0, high = a.length - 1; whil...原创 2011-04-04 10:55:45 · 71 阅读 · 0 评论 -
删除List中所有偶数值项【原】
public static void removeEvensVer(List<Integer> list) { Iterator<Integer> iter = list.iterator(); while (iter.hasNext()) { if ((iter.next() % 2) == 0) { iter.remov...原创 2011-04-04 11:40:47 · 906 阅读 · 0 评论