PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Amazon

Solve Shipping and Bundle-Cost Problems

Last updated: Apr 16, 2026

Quick Overview

This question evaluates algorithmic reasoning for scheduling and capacity planning (minimum daily shipping capacity) and combinatorial optimization with constrained purchases (bundle-cost minimization).

  • medium
  • Amazon
  • Coding & Algorithms
  • Software Engineer

Solve Shipping and Bundle-Cost Problems

Company: Amazon

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

Implement both of the following algorithmic problems. Problem 1: Minimum daily shipping capacity You are given an array `weights` of positive integers. Packages must be shipped in the given order. Each day, you load packages from left to right until adding the next package would exceed the ship's capacity. The remaining packages are shipped on later days. Given an integer `days`, return the minimum ship capacity needed to deliver all packages within `days` days. Problem 2: Minimum cost with bundle offers You need to buy `n` kinds of items. Array `price[i]` gives the individual price of item `i`. Each special offer is an array of length `n + 1`: the first `n` values are quantities of each item in the bundle, and the last value is the bundle price. Given `price`, `special`, and `needs`, return the minimum total cost to satisfy `needs` exactly. You may buy any offer multiple times, but you may not purchase more of any item than needed.

Quick Answer: This question evaluates algorithmic reasoning for scheduling and capacity planning (minimum daily shipping capacity) and combinatorial optimization with constrained purchases (bundle-cost minimization).

Related Interview Questions

  • Implement Datacenter Router Commands - Amazon (hard)
  • Implement Event Filtering and Queue Routing - Amazon (medium)
  • Determine if all courses can be completed - Amazon (medium)
  • Replace Delimited Tokens in a String - Amazon (medium)
  • Minimize Circular Redistribution Cost - Amazon (medium)
Amazon logo
Amazon
Nov 17, 2025, 12:00 AM
Software Engineer
Onsite
Coding & Algorithms
0
0
Loading...

Implement both of the following algorithmic problems.

Problem 1: Minimum daily shipping capacity You are given an array weights of positive integers. Packages must be shipped in the given order. Each day, you load packages from left to right until adding the next package would exceed the ship's capacity. The remaining packages are shipped on later days. Given an integer days, return the minimum ship capacity needed to deliver all packages within days days.

Problem 2: Minimum cost with bundle offers You need to buy n kinds of items. Array price[i] gives the individual price of item i. Each special offer is an array of length n + 1: the first n values are quantities of each item in the bundle, and the last value is the bundle price. Given price, special, and needs, return the minimum total cost to satisfy needs exactly. You may buy any offer multiple times, but you may not purchase more of any item than needed.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Amazon•More Software Engineer•Amazon Software Engineer•Amazon Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.