writeup of algorithms