collection of some basic algorithm which i used.