Introduction to the Design & Analysis of Algorithms