different algorithms for programming