Implementations of algorithm problems using Java