For "Algorithm in java" try these Links: