Morgan Stanley Interview Question

implement vector