Fixed and tested all functions of DynamicArray except clear(), isEmpty(), insert(), and remove()