Algorithm Implementation Assignment#3 Solution