algorithm design notes 7098549