Noname interview question

Implement Smart pointers in cpp