Optimization of Various kind of Algorithm