摘要: package common; import java.util.ArrayList; import java.util.BitSet; import java.util.List; import java.util.Random; public class BitMapDemo { /** * 有1千万个随机数,随机数的范围在1到1亿之间。现在要求写出一种算法,将1到1亿之间没有在随... 阅读全文
posted @ 2019-04-11 11:08 bug_killer 阅读(577) 评论(0) 推荐(0)
摘要: package problem.回溯; public class EightQueue { public static int max = 8,sum = 0; public static int[] queen = new int[max]; //存储列元素值 //皇后元素形式:(i,queue[i]) public void displayQue... 阅读全文
posted @ 2019-04-11 10:30 bug_killer 阅读(261) 评论(0) 推荐(0)
摘要: package 排序; import common.Utils; public class HeapSort { public static void Adjust(int[] arr,int startIndex,int len){ int childIndex = 0; int threshold = len-1; for(;2*... 阅读全文
posted @ 2019-04-11 10:28 bug_killer 阅读(362) 评论(0) 推荐(0)