Hash Maps and Collections
Morgan Stanley's Java rounds keep returning to HashMap. The spoken questions ask how it works inside, and the Core Java & Concurrency lesson covers those. The coding side asks you to use one well, and sometimes to write one from scratch. One of the problems here has opened lateral first rounds.
For each problem here, there's a Java class worth naming while you code. A LinkedHashMap keeps insertion order, and computeIfAbsent puts a value in its bucket in one call. Interviewers also want to hear which Java collection you'd pick for each problem and why. The tests run in six languages, so use whichever one you're fastest in, but say the Java version out loud anyway.
Morgan StanleyPremium lesson · Coding round
The 4 Morgan Stanley problems are below.
- A Premium questionCoding · Medium · Frequently asked
- A Premium questionCoding · Medium · Frequently asked
- A Premium questionCoding · Easy · Frequently asked
+ 1 more in this lesson
Each with hints, the follow-up and a tested solution.
Get the Morgan Stanley questions$49 a year · all 100 companies · cancel anytime
From 20,000+ candidate reports, forum threads behind logins and write-ups in Chinese.
Morgan Stanley interview guideKnow what Morgan Stanley asks before you walk in.
33 coding · 4 system design · 19 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.