Skip to content

gphan/algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithms

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.

Java

The following were Java programs that I wrote. They are in the src folder.

Knapsack

A simple algorithm to solve the famous knapsack problem using dynamic programming.

Sort

A collection of sorting algorithms and a base class that contains some useful helper methods.

Rotate

A couple of rotation algorithms to rotate an array of integers or strings (not implemented).

C

Knuth

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.

Quicksort

Self explanator, was just writing a recursive version of Quicksort.

Kth smallest

Gets the kth smallest number in an array.

Hash table

A hash table implementation in C. Not decent by any means, but was trying to understand it all.

Acknowledgements

Thanks to Wikipedia and the authors for some of the pseudocode and visual diagrams that helps me understand the algorithms.

About

A collection of algorithms for learning purposes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published