All stuff contained is user-implemented algorithms depicted in the book Introduction to Algorithms, and most of which can be considered as candidates for solutions to exercises
For any other solutions to exercise, please see at http://sdrv.ms/17TUmTY
##Chapter 5: Probabilistic Analysis and Randomized Algorithms
-
RandomEx. ch5.1 exer 2implement a generator RANDOM[a,b] by only using RANDOM[0,1] -
PermutingBySorting.randomize an array via generating and sorting priorities associating with elements in the array. -
PermuteInPlace.randomize an array in place. -
RandomSample.produce a m-subset from S={1,2,3,..,n}. -
RandSearch. ch5 Problem 5-2an interesting search algorithm.
##Chapter 6: Heapsort
-
MaxHeapify.keep heap conforming to max-heap property. -
MaxHeapify_Iter.iterative implementation. -
BuildHeap.build a max-heap on an array. -
Heapsortheapsort algorithm.
##Chapter 7: Quicksort
-
QuicksortandPartitionnaive implementation for quicksort and its inherent partition routine. -
RandomPartitionrandomized version. -
QSortWithInsertionan optimizatio implementation that binds insertion sort and quicksort.
##Chapter 8: Sorting in Linear Time
-
CountingSortcounting sort implementation. -
RadixSortandUnderlyingSorta radix sort implementation for 32-bit non-negative integers. -
BucketSortbucket sort implementation. -
InPlaceCountingSortand_InPlaceCountingSorta general in-place counting sort implementation (also need O(k) extra storage) and a special variant of O(1) in-place counting sort.
##Chapter 9: Medians and Order Statistics
-
FindMaxandMinfind both max and min at same time using least comparisons -
RandomizedSelectonandRandomizedSelectonIterk-th smallest problem implementation
##Chapter 10: Elementary Data Structures
-
class
Dequea quick-and-simple deque implementation -
a set of operations based on singly linked list
-
class
XORQueuea queue based on xor-linked-list.