Assignment 1: Memory Allocation++ Solution