Various algorithm test implementations in Java