public void Test1() { var list = new List <int> { 5, 8, 4, 1, 2, 6, 4, 7, 9, 2 }; HeapSorter.HeapSort <int>(list, null); }
/// <summary> /// Class constructor /// </summary> /// <param name="collection">A list</param> /// <param name="comparer">A comparer</param> public BinarySearcher(IList <T> collection, Comparer <T> comparer) { if (collection == null) { throw new NullReferenceException("List is null"); } _collection = collection; _comparer = comparer; HeapSorter.HeapSort(_collection); }
public void HeapSorter_Duplicates_Test() { int[] unsortedInts = { 6, 12, 8, 2, 9, 6 }; HeapSorter.HeapSort(unsortedInts); }
public void HeapSorter_Sort_Check_Sorting_Behavior() { int[] unsortedInts = { 6, 12, 8, 2, 9 }; HeapSorter.HeapSort(unsortedInts); }