随笔分类 -  算法导论实战

摘要:1 package iYou.neugle.graph; 2 3 import java.util.ArrayList; 4 import java.util.List; 5 6 //创建图过程的代码在图的那篇博文中,此处直接使用 7 public class Dijkstra ... 阅读全文
posted @ 2015-07-24 14:20 iYou 阅读(434) 评论(0) 推荐(0)
摘要:1 package iYou.neugle.graph; 2 3 import java.util.Set; 4 import java.util.TreeSet; 5 6 //创建图过程的代码在图的那篇博文中,此处直接使用 7 public class Kruskal { 8... 阅读全文
posted @ 2015-07-23 16:55 iYou 阅读(366) 评论(0) 推荐(0)
摘要:1 package iYou.neugle.graph; 2 3 import java.util.ArrayList; 4 import java.util.List; 5 6 //创建图过程的代码在图的那篇博文中,此处直接使用 7 public class Prim { 8 pri... 阅读全文
posted @ 2015-07-23 09:23 iYou 阅读(446) 评论(0) 推荐(0)
摘要:1 package iYou.neugle.graph; 2 3 import java.util.LinkedList; 4 import java.util.Queue; 5 import java.util.Stack; 6 7 public class MyGraph1 ... 阅读全文
posted @ 2015-07-22 09:51 iYou 阅读(358) 评论(0) 推荐(0)
摘要:1 package iYou.neugle.tree; 2 3 import java.util.ArrayList; 4 import java.util.List; 5 6 public class Binary_Tree { 7 private Tree tree ... 阅读全文
posted @ 2015-07-13 15:56 iYou 阅读(251) 评论(0) 推荐(0)
摘要:1 package iYou.neugle.list; 2 3 public class MySeqStack { 4 private Stack stack = new Stack(); 5 6 class Stack { 7 public int maxSi... 阅读全文
posted @ 2015-07-10 16:44 iYou 阅读(224) 评论(0) 推荐(0)
摘要:1 // 普通队列 2 package iYou.neugle.list; 3 4 public class MySeqQueue { 5 private SeqQueue queue = new SeqQueue(); 6 7 class SeqQueue { 8 ... 阅读全文
posted @ 2015-07-10 15:56 iYou 阅读(192) 评论(0) 推荐(0)
摘要:1 package iYou.neugle.list;2 3 // 链表数据结构4 public class Node {5 // 该节点的值6 public T data;7 // 该节点指向的下一个节点8 public Node next;9 } 1 packa... 阅读全文
posted @ 2015-07-10 11:21 iYou 阅读(384) 评论(0) 推荐(0)
摘要:1 package iYou.neugle.list; 2 3 public class MySeqList { 4 private int initMaxSize = 10; 5 private T[] list; 6 private int listLen = 0; ... 阅读全文
posted @ 2015-07-08 10:28 iYou 阅读(186) 评论(0) 推荐(0)
摘要:1 package iYou.neugle.search; 2 3 public class BSTree_search { 4 class BSTree { 5 public int data; 6 public BSTree left; ... 阅读全文
posted @ 2015-07-07 22:51 iYou 阅读(224) 评论(0) 推荐(0)
摘要:1 package iYou.neugle.search; 2 3 import java.util.ArrayList; 4 import java.util.List; 5 6 public class Index_search { 7 class IndexItem... 阅读全文
posted @ 2015-07-07 13:45 iYou 阅读(974) 评论(0) 推荐(0)
摘要:1 package iYou.neugle.search; 2 3 public class Hash_search { 4 private static int m = 13; 5 private static int[] hash = new int[m]; 6 pr... 阅读全文
posted @ 2015-07-07 09:51 iYou 阅读(428) 评论(0) 推荐(0)
摘要:1 package iYou.neugle.search; 2 3 public class Binary_search { 4 public static int BinarySearch(double[] array, double key) { 5 int left... 阅读全文
posted @ 2015-07-06 17:23 iYou 阅读(282) 评论(0) 推荐(0)
摘要:1 package iYou.neugle.search; 2 3 public class Sequence_search { 4 public static int SequenceSearch(double[] array, double key) { 5 for ... 阅读全文
posted @ 2015-07-06 17:06 iYou 阅读(202) 评论(0) 推荐(0)
摘要:1 package iYou.neugle.sort; 2 3 public class Shell_sort { 4 public static void ShellSort(double[] array) { 5 int n = array.length; 6 ... 阅读全文
posted @ 2015-07-06 16:00 iYou 阅读(159) 评论(0) 推荐(0)
摘要:1 package iYou.neugle.sort; 2 3 public class Heap_sort { 4 public static void HeapSort(double[] array) { 5 for (int i = (int) Math.floor... 阅读全文
posted @ 2015-07-06 14:48 iYou 阅读(208) 评论(0) 推荐(0)
摘要:1 package iYou.neugle.sort; 2 3 public class Quick_sort { 4 public static void QuickSort(double[] array, int left, int right) { 5 if (le... 阅读全文
posted @ 2015-06-08 11:56 iYou 阅读(168) 评论(0) 推荐(0)
摘要:1 package iYou.neugle.sort; 2 3 public class Select_sort { 4 public static void SelectSort(double[] array) { 5 for (int i = 0; i array[... 阅读全文
posted @ 2015-06-08 11:55 iYou 阅读(146) 评论(0) 推荐(0)
摘要:1 package iYou.neugle.sort; 2 3 public class Bubble_sort { 4 public static void BubbleSort(double[] array) { 5 for (int i = 0; i i; j--... 阅读全文
posted @ 2014-09-02 14:27 iYou 阅读(159) 评论(0) 推荐(0)
摘要:1 package iYou.neugle.sort; 2 3 public class Merge_sort { 4 5 public static void MergeSort(double[] array, int start, int end) { 6 if (... 阅读全文
posted @ 2014-09-02 13:24 iYou 阅读(195) 评论(0) 推荐(0)