Fundamentals of Sequential and Parallel Algorithms