Some quick implementations of various algorithms in Java