# Batch packing and bin optimization interview question

Aced (formerly Exponent) publishes a public search API over its indexed pages; the guide is at https://www.aced.io/agents/agent-access.

Source: https://www.aced.io/questions/4910/batch-packing-bin-optimization
Source observed: 2026-11-05T00:03:01.834Z
Last checked: 2026-11-05T00:03:01.834+00:00
Indexed: 2026-11-07T03:10:28.727+00:00

---

# Batch packing and bin optimization

We publish this coding interview question for practicing algorithms and data structures:

> Given a list of items with different sizes, write an algorithm to pack these items into the minimum number of batches without exceeding the capacity of each batch.

## Interview context

- **Role:** [Software Engineer](https://www.aced.io/questions?role=swe)
- **Company:** [Amazon](https://www.aced.io/questions?company=amazon)
- **Categories:** [Data Structures & Algorithms](https://www.aced.io/questions?type=algorithms) and [Coding](https://www.aced.io/questions?type=coding)
- **Reported last asked:** 2 years ago

Detailed company statistics for this question require an [Upgrade](https://www.aced.io/upgrade?src=questions). To answer the question, [log in or sign up](https://www.aced.io/signup?src=nav&returnPath=/questions/4910/batch-packing-bin-optimization). Submitting an answer marks the question complete.

## Community answers

No answers have been contributed by the community yet.

## Related questions

- [Given a list of numbers, find the median without sorting the entire list. Hint: Use quick sort algorithm.](https://www.aced.io/questions/4570/find-median-quicksort-algorithm)
- [Given a string with parentheses, write a function that removes the minimum number of characters to balance the parentheses.](https://www.aced.io/questions/4537/balance-parentheses-string-manipulation)
- [A knapsack has a maximum capacity C and there are n items each with weight w[i] and value v[i]. Maximize the knapsack value without exceeding capacity.](https://www.aced.io/questions/2279/maximize-knapsack-value)

## Related courses

### [Software Engineering Interview Prep](https://www.aced.io/courses/software-engineering)

We help you prepare for software engineering roles at Google, Amazon, Microsoft, Meta, Apple, and other top companies. The course includes mock interviews, frameworks, and advice from senior candidates, with practice in data structures, algorithms, system design, people management, behavioral interviews, and more.

![Software Engineering Interview Prep](https://images.ctfassets.net/x78yjrjc11pq/4VkuYewBHUFIVUS5oJDW5h/02e833439b1289f25f38f13f81cbdca3/adobe_stock_optimized.jpeg?w=800&h=800&fm=webp&q=75)

### [System Design Interviews](https://www.aced.io/courses/system-design-interviews)

We teach approaches for answering current system design questions across product, infrastructure, and AI domains. The course includes in-depth video examples, written breakdowns, reference patterns, and mock interview videos featuring senior engineers and managers.

![System Design Interviews](https://images.ctfassets.net/x78yjrjc11pq/78x7miFZFjBCrM5GqftrMJ/2f6d26e632c4e7265c49f6a180227edb/system_design_track_compressed_26ac98a46e__281_29_5be2280f31.jpeg?w=800&h=800&fm=webp&q=75)

## Explore Aced

Aced, formerly Exponent, provides interview preparation through courses, questions, practice, coaching, and related career resources. Available areas include [all questions](https://www.aced.io/questions), [courses](https://www.aced.io/courses?src=nav), [Loops](https://www.aced.io/guides?src=nav), [Experiences](https://www.aced.io/experiences?src=nav), and [Practice](https://www.aced.io/practice?src=nav).

Our interview-course catalog includes [Product Management](https://www.aced.io/courses/pm?src=nav), [Forward Deployed](https://www.aced.io/courses/forward-deployed-engineering?src=nav), [Engineering Management](https://www.aced.io/courses/engineering-management?src=nav), [Software Engineering](https://www.aced.io/courses/software-engineering?src=nav), [System Design](https://www.aced.io/courses/system-design-interviews?src=nav), [Data Science](https://www.aced.io/courses/data-science?src=nav), [Machine Learning](https://www.aced.io/courses/ml-engineer?src=nav), [Data Engineering](https://www.aced.io/courses/data-engineering?src=nav), [AI Engineering](https://www.aced.io/courses/ai-engineering?src=nav), [Investment Banking](https://www.aced.io/ib?src=nav), [Generative AI](https://www.aced.io/courses/gen-ai-interviews?src=nav), [Security Engineer](https://www.aced.io/courses/security-engineer?src=nav), [TPM](https://www.aced.io/courses/tpm?src=nav), [Solutions Architect](https://www.aced.io/courses/solution-architect-interview?src=nav), [UX / Product Design](https://www.aced.io/courses/product-designer-interview?src=nav), and [BizOps & Strategy](https://www.aced.io/courses/bizops?src=nav).

We also offer [Coaching](https://www.aced.io/coaching?src=nav), [Mock Interviews & Coaching](https://www.aced.io/coaching?category=mock_interviews&src=nav), [Resume Review](https://www.aced.io/resume?src=nav), and [Salary Negotiation](https://www.aced.io/coaching?category=negotiation&src=nav).

---

[Read this page’s summary](https://www.aced.io/agents/api/public/v1/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F4910%2Fbatch-packing-bin-optimization&trace=t_679ff9ab98f3)

## Ask a follow-up about this page

Need a more specific answer? Ask the exact question you have. It returns a fresh, cited answer from Aced (formerly Exponent)’s knowledge base. No account or API key required.

Open this URL with your own question, URL-encoded. Include your question in q. All research inputs are optional; no account or setup.

`GET https://www.aced.io/agents/agent/faq?q={question}&trace=t_679ff9ab98f3`

[Tool guide and examples](https://www.aced.io/agents/agent-access) · [OpenAPI](https://www.aced.io/agents/api/public/v1/openapi.json) · [Page TLDR form](https://www.aced.io/agents/agent-tools/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F4910%2Fbatch-packing-bin-optimization). Opening a form does not execute a tool.