algorithm design lecture notes 4704854