Robert Sedgewick Quote

Public class Merge{ private static Comparable[] aux; // auxiliary array for merges public static void sort(Comparable[] a) { aux = new Comparable[a.length]; // Allocate space just once. sort(a, 0, a.length - 1); }    private static void sort(Comparable[] a, int lo, int hi) { // Sort a[lo..hi]. if (hi <= lo) return; int mid = lo + (hi - lo)/2; sort(a, lo, mid); // Sort left half. sort(a, mid+1, hi); // Sort right half. merge(a, lo, mid, hi); // Merge results (code on page 271). }}

Robert Sedgewick

Public class Merge{ private static Comparable[] aux; // auxiliary array for merges public static void sort(Comparable[] a) { aux = new Comparable[a.length]; // Allocate space just once. sort(a, 0, a.length - 1); }    private static void sort(Comparable[] a, int lo, int hi) { // Sort a[lo..hi]. if (hi <= lo) return; int mid = lo + (hi - lo)/2; sort(a, lo, mid); // Sort left half. sort(a, mid+1, hi); // Sort right half. merge(a, lo, mid, hi); // Merge results (code on page 271). }}

Related Quotes

About Robert Sedgewick

Robert Sedgewick or Sedgwick may refer to:

Robert Sedgewick (computer scientist) (born 1946), American computer scientist and author
Robert Sedgewick (judge) (1848–1906), justice of the Supreme Court of Canada
Robert Sedgwick (colonist) (c. 1611–1656), American colonist
Robert Sedgwick (actor), American actor