Add sample algorithms implementations - java