Homework assignment 3 for COP3530 Data Structures & Algorithm Analysis