DAA Homework 4