Amazon SDE2 | Screening Round

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2025-06-27Added By Anonymous
Source: Link

Company: Amazon
Role: SDE2
Interview Stage: Screening Round
Location: unknown
Year: unknown

Original Post Content:

Hi All,
Last week I gave the screening round interview for Amazon SDE-2. Here are the questions asked.

Q1 - Amazon's manufacturing plant is located in Seattle. The products are transported from the manufacturing plant to the city within some d days in a bus. There is the transportation line within the manufacturing plant on which products are kept and individual products have the weights which is represented by the weight[i]. Each day the bus is loaded with the products of the transportation line. We may not load more weight than the maximum weight capacity of the bus.
As the traffic rules are very strict against overloading of the buses in Seattle, Amazon wants to build the software that can find the least weight capacity of the bus that will result in all the products on the transportation line being transported to the city within d days.

Input: Products weights = [20,10,30,40], days =2
output 60
Input :
Products weights = [1,2,3,4,5,6,7,8,9,10], days =5

Solution - This was a typical Binary search question similar to rotting oranges. I gave the working code in first 10 minutes and then took around 10-12 Minutes to dry run on 2-3 test cases.

Q - 2 Serialize and deserialize a binary tree

def serialize(TreeNode root): string

def deserialize(String result): Tree

Solution -
For Serialize - I told the pre-order traversal.
For Deserialize - I told the recursive solution by splitting the string
He just asked the approach and didn't needed the code.

Resulted - Rejected, I am not sure why because everything went fine. The interviewer was in hurry and joined 10 mins late and left 10 mins early as he told he was having scrum call.

Comments