摘要: 大数阶乘的计算是一个有趣的话题,从中学生到大学教授,许多人都投入到这个问题的探索和研究之中,并发表了他们自己的研究成果。如果你用阶乘作关键字在google上搜索,会找到许多此类文章,另外,如果你使用google学术搜索,也能找到一些计算大数阶乘的学术论文。但这些文章和论文的深度有限,并没有给出一个高速的算法和程序。我和许多对大数阶乘感兴趣的人一样,很早就开始编制大数阶乘的程序。从2000年开始写第一个大数阶乘程序算起,到现在大约己有6-7年的时光,期间我写了多个版本的阶乘计算器,在阶乘计算器的算法探讨和程序的编写和优化上,我花费了很大的时间和精力,品尝了这一过程中的种种甘苦,我曾因一个新算法的 阅读全文
posted @ 2012-10-04 12:21 寻梦尤风 阅读(1262) 评论(0) 推荐(0) 编辑
摘要: package com.donghao.shellSort;public class ShellSort { public static void main(String[] args){ int maxSize = 10; ArraySh arr; arr = new ArraySh(maxSize); for(int i=0;i<10;i++){ long n = (int)(Math.random() * 100); arr.insert(n); } System.out.println("排序前"); arr.display(); Syste... 阅读全文
posted @ 2012-10-04 10:49 寻梦尤风 阅读(224) 评论(0) 推荐(0) 编辑
摘要: package com.donghao.anagram;import java.util.Scanner;public class AnagramApp { static int size; static int count; static char[] arrChar = new char[100]; static int flag = 0; public static void main(String[] args){ System.out.println("Please enter a word"); Scanner scan = n... 阅读全文
posted @ 2012-10-04 09:09 寻梦尤风 阅读(124) 评论(0) 推荐(0) 编辑