Role: Technology Apprenticeship Program or in short SDE intern
Platform: AMCAT SHL
Total Time: ~2 hours or 111 mins
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
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.
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:
x and add x to your total score.x and all occurrences of x-1, and x+1 from 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:
n (number of days)stock of length n (consisting of '0' and '1')
k → number of extra shipments you can sendYou 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:
Total ways = 4
Output:
4

#MorganStanley #OA #2027Batch