kthsmallest
Class TestArrayUtils

java.lang.Object
  extended by kthsmallest.TestArrayUtils

public class TestArrayUtils
extends java.lang.Object

This class provides static methods (utilities) for testing properties of arrays.


Constructor Summary
TestArrayUtils()
           
 
Method Summary
static boolean testPartitionOfKth(int[] anArray, int k)
          Indicates whether given array is correctly partitioned at position k (must adjust for 0-based indexing)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestArrayUtils

public TestArrayUtils()
Method Detail

testPartitionOfKth

public static boolean testPartitionOfKth(int[] anArray,
                                         int k)
Indicates whether given array is correctly partitioned at position k (must adjust for 0-based indexing)

Parameters:
anArray - an array of ints
k - position of partition location to be checked
Returns:
true if anArray is partitioned at position k