ALGO Assignment 4