Morgan Stanley Interview Question

basic data structures like sliding window,,,