Algorithm coursework