This is just a collection of Java code that I have been writing to refresh my memory of some CS basics.
I welcome any advice and critique to make the algorithms more optimized or cleaning up the code.
The following were Java programs that I wrote.
They are in the src
folder.
A simple algorithm to solve the famous knapsack problem using dynamic programming.
A collection of sorting algorithms and a base class that contains some useful helper methods.
A couple of rotation algorithms to rotate an array of integers or strings (not implemented).
It's been a while, but I believe this was to generate a random array of numbers. Based on one of Knuth's famous algorithms in his programming bibles.
Self explanator, was just writing a recursive version of Quicksort.
Gets the kth smallest number in an array.
A hash table implementation in C. Not decent by any means, but was trying to understand it all.
Thanks to Wikipedia and the authors for some of the pseudocode and visual diagrams that helps me understand the algorithms.