1: // $Id: heapsort.java,v 1.1 2004-05-23 06:37:41 bfulgham Exp $ 2: // http://www.bagley.org/~doug/shootout/
7: public class heapsort { 8:
22: } 23: heapsort(N, ary); 24: System.out.print(nf.format(ary[N]) + "\n");
32: public static void heapsort(int n, double ra[]) { 33: int l, j, ir, i;
7: public class HeapSort { 8:
9: /** 10: * Here is a very naive implementation of the heapsort, but it should 11: * convey the general idea.
14: */ 15: public static List<Integer> heapSort(List<Integer> unsorted) { 16: PriorityQueue<Integer> heap = new PriorityQueue<Integer>();
34: System.out.println(heapSort(a)); 35: }
Google Home - Google Code - Discuss - Terms of Service - Help - Submit Your Code
©2010 Google - Privacy