Recording the algorithms(exercise) I have done.