Morgan Stanley interview question

data structure and algorithm