Fundamental algorithms implemented in Java