Homework project for advanced algorithm.