Package quicksort

Examples of quicksort.Quicksorter


public class TestQuickSort {

  @Test
  public void testQuicksortOneValue(){
    Quicksorter qs = new Quicksorter();
   
    int[] expecteds = new int[]{1};
    int[] actuals = qs.qsort(new int[]{1}, 0, 1);
   
    Assert.assertArrayEquals(expecteds, actuals);
  }
View Full Code Here


    Assert.assertArrayEquals(expecteds, actuals);
  }
 
  @Test
  public void testQuicksortTwoValues(){
    Quicksorter qs = new Quicksorter();
   
    int[] expecteds = new int[]{1, 2};
    int[] actuals = qs.qsort(new int[]{2, 1}, 0, 1);
   
    Assert.assertArrayEquals(expecteds, actuals);
  }
View Full Code Here

TOP

Related Classes of quicksort.Quicksorter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.