Morgan Stanley interview question

basic data structures like sliding window,,,