Morgan Stanley Interview Question

like how would you implement a smart pointer