My implementation of some algorithms