all the algorithm i have written