Microsoft Interview Question

Oops and datastructure