design and analysis of algorithms 7331