Panda Guru LogoPanda
Guru

Amazon SDE2 OA

Round 1

Questions: In a given center, n types of products are to be shipped where the number of parcels of product type 'i' is denoted by quantity[i]. A truck can carry a maximum 'capacity' number of parcels with no more than 'max_parcels_of_same_type' parcels of the same type. Find the minimum number of trucks needed to ship all parcels of all types from this center.

Input/Output Examples:

Candidate's Approach

The candidate's approach was to calculate the total sum of parcels and return the result of (sum/Math.min(capacity, max_parcels_of_same_type)) + 1. However, this approach only passed 4 out of 15 test cases.

Interviewer's Feedback

No feedback provided.