Morgan Stanley Interview Question

Implement a dynamic array (vector in c++) with code.