Basic algorithms and applications in Java