Implementation of a couple of search and sort algorithms in Java