Algorithm I assignment 2