Morgan Stanley interview question

like how would you implement a smart pointer