Stanford Algorithms: Design and Analysis