Smallest.java - Added Java code for the pseudocode algorithm