Assignment done for Algorithms and Data Structures class