Various searching algorithms written in Java