摘要: ```java /** * Created by root on 16-3-12. */ public class SortAlgorithms { //Insertion sort public E[] insertionSort(E[] a){ int length=a.length; for(int i=0;i0&&a[j].compareT... 阅读全文
posted @ 2016-03-12 18:55 Salaku 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 堆排序的过程: java / Created by root on 16 3 12. / public class BinaryHeap { //internal class public static class ArrayList { public static int DEFAULT_SIZE 阅读全文
posted @ 2016-03-12 14:21 Salaku 阅读(296) 评论(0) 推荐(0) 编辑
摘要: ```java /** * Created by root on 16-3-11. */ import java.lang.Math; public class QuadraticProbingHashTable { private static int DEFAULT_TABLE_SIZE = 11; //fields private int currentSiz... 阅读全文
posted @ 2016-03-11 12:18 Salaku 阅读(332) 评论(0) 推荐(0) 编辑
摘要: ```python import math def nextPrime(n): m=int(math.sqrt(n)) def isPrime(x,y): if(y==1): return True elif(x%y==0): return False else: ... 阅读全文
posted @ 2016-03-11 10:01 Salaku 阅读(617) 评论(0) 推荐(0) 编辑
摘要: ```python import random def getResult(): L=[0,0,0] car=random.randint(0,2) L[car]=1 choice=random.randint(0,2) if choice==car: return 0 else: return 1 阅读全文
posted @ 2016-03-10 09:44 Salaku 阅读(350) 评论(0) 推荐(0) 编辑
摘要: ```python import time #import funct # define decorator# record time1 #call f and excute f then store the result in 'r' # reocond end time #compute time2-time1 ... 阅读全文
posted @ 2016-03-08 22:29 Salaku 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 双向节点 双向链表 用于存储数据单元 HashTable List 用于存放双向链表 构成一个十字链表 HashTable 用于增加 和 删除 以及查找 测试类 输出结果 阅读全文
posted @ 2016-03-06 14:59 Salaku 阅读(611) 评论(0) 推荐(0) 编辑
摘要: BinaryNode类 Parent interface SearchTree类 测试类 阅读全文
posted @ 2016-03-05 09:48 Salaku 阅读(209) 评论(0) 推荐(0) 编辑
摘要: Predecessor interface ListNode OrderedList 测试类 结果 阅读全文
posted @ 2016-03-04 16:28 Salaku 阅读(760) 评论(0) 推荐(0) 编辑
摘要: BinaryTree类 ListNode类 队列 测试类 阅读全文
posted @ 2016-03-03 13:50 Salaku 阅读(144) 评论(0) 推荐(0) 编辑