interview experience logo
Interview Experience· SDE I Intern

Amazon SDE I INTERN OA Experience Question Discussion

Posted
8 Aug 2026
64 reads

Summary

I completed an online assessment that asked me to maximize the number of secure deliveries across k warehouses.

How it went

Had this question in an Amazon OA.

Question

You are given:

deliveryLogs[] — number of deliveries in each log k — an even number representing the number of warehouses

You have exactly k warehouses.

A warehouse can contain deliveries from only one log. Deliveries from the same log can be split across multiple warehouses. After storing everything, the largest k/2 warehouses are compromised. Only the deliveries in the remaining k/2 warehouses are considered secure.

Find the maximum possible number of secure deliveries.

Questions asked (1)

  1. 01

    Maximum Secure Deliveries

    Data Structures & Algorithms

    You are given an array deliveryLogs[] where each element represents the number of deliveries in a log, and an even integer k representing the total number of warehouses. You must allocate the deliveries to exactly k warehouses with the following constraints:

    • Each warehouse can contain deliveries from only one log.
    • Deliveries from the same log can be split across multiple warehouses.
    • After allocation, the largest k/2 warehouses are considered compromised.
    • Only the deliveries stored in the remaining k/2 warehouses are counted as secure.

    Return the maximum possible number of secure deliveries.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Interview Experience recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!