Algorithms
Mostly inspired by Introduction to Algorithms by Cormen, Leiserson,
Rivest (1st Ed.)
Download these into a C++ compiler such as DevC++ or GNU.
Sorting
Conduct experiments of the standard sorting algorithms: selection,
insertion, bubble, quicksort, mergesort, heapsort, counting sort,
radix sort, qsort and STL sort. Chapters 1, 7, 8 and 9. Particular
emphasis on quicksort to beat STL sort.
sorting_experiments.cpp
Selection
Order statistic in O(n) using partition. Chapter 10
selection.cpp
Weighted median. page 194
weighted_median.cpp
Search
Demo that seqeuential search of random array will find a new max(min)
about ln N times.
find_max_lnN.cpp
Dynamic programming. Chap. 16
Matrix chain multiplication
Dynamic programming method to find optimal matrix chain
multiplication order. Also, Catalan numbers and all parenthesizations.
Matrix chain CLR 16.1
Longest common subsequence
LCS Also, all subsequences. CLR 16.3
Longest common substring Also, all substrings.
Greedy algorithms. Chap. 17
Maximal set of non-overlapping intervals.
Activity selection CLR 17.1
Misc
Josephus permutations or generalized eeny-meeny-miny-moe CLR p.296
Other programs are in CMIS
160
Combinatorics, boolean logic, finite state automata, graph theory, recursion.