Panda Guru LogoPanda
Guru

Amazon OA SDE-II | US

Round 1

Questions:

Question

In Amazon's massive warehouse inventory, there are n different types of products. You are given an array products of size n, where products[i] represents the number of items of product type i (where i ranges from 0 to n-1). These products need to be packed into batches for shipment.

Batch Packing Conditions:

Additional Notes:

Input Details: The product types are numbered from 0 to n-1. The array products[i] gives the number of items of product type i for each product type.

Example: Input:

n = 5 products = [2, 3, 1, 4, 2]

Result: Maximum number of batches = 4.

Follow-up Question

Specific question not provided.

Candidate's Approach

The candidate solved the second problem and passed all tests. For the first problem, they encountered an issue where they defined a prefix array of the wrong size and needed to increment it by 1, which caused them to fail 3 test cases.

Interviewer's Feedback

No feedback provided.