Morgan Stanley Interview Question

previous experience + brain teaser + programming question