Morgan Stanley OA Experience – 2027 Batch
Morgan Stanley OA Experience – 2027 Batch
Role: Technology Apprenticeship Program or in short SDE intern
Platform: AMCAT SHL
Total Time: ~2 hours or 111 mins
Sections:
-
Debugging (15 mins, 7 questions)
Fix 1-2 bugs in small code snippets (C++/Java/Python). -
Aptitude (36 mins, 24 questions)
Interactive questions (not MCQ) – drag & drop scheduling, plotting graphs, adjusting line charts, logical reasoning. -
Coding (60 mins, 3 questions) – LeetCode Medium level
Full Coding Questions
Q1
Given an array of coupon numbers (may contain duplicates).
Example: [4, 4, 4, 4, 8, 3, 5, 9]
The mall wants to shuffle the array by alternately taking elements from the first half and second half while maintaining relative order.
It is guranteed that array size is even.
- Take 1st element of first half
- Then 1st element of second half
- Then 2nd element of first half
- Then 2nd element of second half and so on.
Output: The new shuffled array.
Q2 – Variant of LeetCode 740. Delete and Earn
Given an array of integers.
Example: [8, 3, 4, 2, 2, 7]
You repeatedly do the following until the array is empty:
- Pick any element
xand addxto your total score. - Remove
xand all occurrences ofx-1, andx+1from the array.
You can pick any element (front/back/random) and the answer will be same
Return the final score you can achieve so no element is left in array.
Q3
Given:
- An integer
n(number of days) - A binary string
stockof lengthn(consisting of '0' and '1')- '1' → shipment already scheduled
- '0' → empty day
- An integer
k→ number of extra shipments you can send
You are allowed to convert exactly k zeros into ones.
Task:
Return the number of ways to perform this conversion.
Example:
n = 7
stock = "1010100"
k = 3
Explanation:
Zeros are present at 4 positions.
We need to choose any 3 of these positions and convert them to '1'.
Possible selections:
- Choose positions (1, 3, 5)
- Choose positions (1, 3, 6)
- Choose positions (1, 5, 6)
- Choose positions (3, 5, 6)
Total ways = 4
Output:
4

#MorganStanley #OA #2027Batch


