Amadeus interview question

C++ , smart pointer