Microsoft interview question

Oops and datastructure