摘要: package com.cn.gao;//归并排序算法设计public class MergeSort { public static final int SIZE=15; /** * 合并一次算法 * @param a 原数组 * @param b 合并后存放数... 阅读全文
posted @ 2015-05-06 19:28 ~风轻云淡~ 阅读(678) 评论(0) 推荐(0) 编辑
摘要: http://yizhilong28.iteye.com/blog/1154098在linux下跑一个多线程读取文件的程序,待读取文件有数十万个。程序读取过程中抛出如下异常*****(Too many open files)。 原因是由于linux限制了一次会话中,程序最大同时打开文件数目。在red... 阅读全文
posted @ 2015-05-06 16:19 ~风轻云淡~ 阅读(4885) 评论(0) 推荐(0) 编辑
摘要: package com.cn.gao; //堆排序程序设计 public class HeapSort { public static final int SIZE=10; //堆排序算法 public static void heapSort(int[] a, int n){ int i,j,temp,k; //建大根堆过程 ... 阅读全文
posted @ 2015-05-06 12:16 ~风轻云淡~ 阅读(280) 评论(0) 推荐(0) 编辑