all kinds of Algorithm for java