Amazon SDE Intern OA + Interview Detailed Experience
Anonymous User
741

Role: SDE Intern
Opportunity: On-Campus Hiring
Location: Bengaluru, India (most probably)
Process: OA + DSA Round + Problem Solving / GenAI Fluency


Online Assessment

Time Limit: 70 minutes
Question Count: 2
(Additionally, Work Proficiency Test was also there after this, not timed)

Question 1

N tasks, cap[i] denotes the capacity needed to complete i-th task.
M workers, throughput[j] denotes the maximum capacity, i.e. j-th worker can take i-th task if cap[i] <= throughput[j].
One worker can take only one task, one task will take 1 second to finish, and after finishing a task a worker needs a buffer of 1 second before picking another task.
Return the total time needed to complete all tasks, if not possible return -1.

My Approach

Sort both tasks and workers descending to process the hardest tasks first. If the highest task capacity exceeds the maximum worker throughput, it's impossible (return -1).
Maintain a min-heap tracking active workers based on their total completed tasks (or availability time), alongside a pointer for un-deployed workers. For each task, dynamically advance the pointer to inject all newly eligible workers (whose throughput >= current task's capacity) directly into the heap with an initial task count of 0. Pop the worker with the fewest tasks completed to execute the current task, increment their workload, and push them back into the heap for future reuse.

Question 2

N servers, cap[i] represents the capacity of the i-th server, floor(N/2) servers need to be primary, and the rest secondary, each primary server needs their own secondary server, each secondary server must be greater than or equal to their primary server in terms of capacity.

The power of the system is determined by the summation of the capacities of the primary servers. Return the maximum possible power of the system, if we allocate primary and secondary servers optimally.

My Approach

Sort the array in descending order to process elements from largest to smallest. By taking the summation of alternate elements starting from the first index (cap[1] + cap[3] + cap[5] + ... ), you maximize the total system power. This greedy approach works perfectly because for every element at an odd index i, its preceding element at i-1 is guaranteed to be greater than or equal to it due to the descending sort - meaning cap[i-1] can always optimally serve as the required secondary server for the primary server cap[i].

Overall Experience

Felt the questions were on much easier side, took ~25 minutes to complete the entire coding test. Work Proficiency Test took a good amount of time as I had to process every situation and think clearly (Amazon cares about this more than we generally think).

Two days later, got the interview confirmation. Just a tip here, code quality and work proficiency test matters, as many people who solved both the questions didn't get selected, and some people who solved 1.5 questions also got selected. Keep this in mind.


Interview Round 1 Experience

Consisted of: 2 DSA Question + 1 LP Question + 2 GenAI Related Questions

Avg Time Spent:
Walkthrough & Introduction : ~5 min
Question 1: ~30 min
Question 2: ~15 min
LP & GenAI: ~10 min

Two interviewers took the interview, after the introduction, moved quickly to the first question. The first question was standard Longest Common Subsequence, interviewers expected me to first explain the brute force solution and then move on to the optimal approach. Explained the brute force, discussion stretched a bit while explaining the time complexity, but after a while the interviewers were satisfied. Then swiftly moved on to the classic DP solution, and smoothly went over the solution. They were satisfied with my explanation this time, and so went on to implement it. Took ~3-5 min implementing the solution, just fumbled a bit where I missed adding +1 to the dp ans, but quickly corrected it after their nudging. Satisfied by this, they moved on to the next question.

The next question was Merge Two Sorted Linked Lists, my first time facing a linked list question in any interview (lol). Nonetheless, a very easy and standard question, explained the two-pointer approach quickly, they were satisfied on first-try, and we moved on to code implementation. This time, did not do any logical error in the code, just that when we solve Merge Two Sorted Arrays, we need two separate while loops at the end to end the remaining array, but that step becomes unnecessary for linked lists as we can directly point the node and our work is done, did this by mistake, but fixed it nonetheless. Satisfied, they moved on to LP questions.

The LP Question was "Tell me a time when you worked on a problem which was difficult for you". Shared a recent hackathon story (reward hacking in RL) for this, one of them said that she will come back to this later, but time wasn't enough. The next question was "How do you use GenAI in your day to day work?", explained my process in brief on how I prompt and all, and then they asked "Tell me about a project where you've used GenAI". Shared one of my projects here (AI Associate for VCs), they quite liked the idea of the project.

Last two minutes, they gave me space to ask them questions, asked about their experience at Amazon and what are they working on.

Time's up, moved on to the next interview.

Interview Round 2 Experience

Consisted of: 2 DSA Question + Resume Experience Discussion + 1 LP Question

Avg Time Spent:
Walkthrough & Introduction : ~5 min
Question 1: ~15 min
Question 2: ~30 min
Resume & LP: ~10 min

Round 2 started immediately after Round 1, no gaps. Only one interviewer this time. Started with the DSA questions quickly after the introduction.

The first question was: Given an array, you can do a merge operation where you merge (or sum) two adjacent equal numbers, remove both the numbers, and replace with the new merged number. For example, [3 1 1] becomes [3 2]. Now you can operate infinite number of times, and you need to return the smallest final array after doing all the possible operations optimally, e.g. for [1 1 1 1] the answer will be [4] and not [1 2 1]. The question screamed stack to me. Although, tried a two pointer approach and proved myself wrong with an edgecase in the interview, and then used this example to introduce stack in the solution. The interviewer was satisfied, so went on to implement the solution. Took ~3 min to implement. He was satisfied, no mistakes this time.

The second question is where things got a bit wobbly. The question was Kth Smallest Element in a Sorted Matrix. First time encountering this problem, haven't solved before. Went with the brute-force first, convert this to an 1-D array, sort, and return k-th element. Satisfied, he pushed me to optimise further. Thought for ~1-2 min, and then explained the priority queue approach, where we kinda do like BFS, start from the smallest, and maintain a minheap, and when we pop (i, j), we add (i+1, j) and (i, j+1). Break the loop when you got the k-th element. Discussion about the problem and time complexity here got a little bit stretched. After getting satisfied, he pushed me to optimise even further.

Seeing me struggle, gave me one hint (to think global), and then advised me to solve the problem of "given X, count numbers less than or equal to X in the matrix". Solved that using the top right start & elimination approach. And then briefly discussed about how to bring that idea here. Already 50 mins passed, so he advised me not to code, and we moved on to resume questions.

He went through the resume and asked me to explain one project I did at any internship. Shared my experience, and then moved on to the next LP question - "Tell me a time when you noticed a critical bug yourself." Shared another internship story, and he was satisfied.

Last ~3-5 mins, he opened the room for me to ask questions. Asked the same, his contributions, and in addition to all this, also asked him about one of his complex systems.


Overall Interview Experience

It was a wonderful experience. I did my level best, no regrets on that. Always can be better, and will learn from this.

Chances are there, decision still pending, hoping for the best. Learnt from the fumbles. Let me know what do you thnk about this, any feedback/suggestion/queries are welcome.

Thank you so much for reading! Hope this helps!

Comments (6)