GHD interview question

Data structures and algorithms Oops concept