My implementation of different algorithms