FastPrepOne Package for All Products

One Package for All Products

Amazon logoAmazon● EasyNEW GRADPHONE SCREEN

Problem statement

products and packages contain triples in the fixed order [length, width, height].

For this exercise, a package can contain a product if each product dimension is at most the corresponding package dimension. Rotation is not allowed and touching the boundary is allowed.

Return true if one package can individually contain every product, and false otherwise. Products are tested separately against that same package; this is not a simultaneous three-dimensional packing problem.

The problem statement continues
Pro

Examples

Example 1

products = [[2,4,3],[3,2,5]]packages = [[3,4,5],[5,3,5]]return = true

Package [3,4,5] individually contains both products in their fixed orientation.

FastPrep Pro
Reported in 1 Amazon interview this week

Unlock this recently reported problem

FastPrep Pro gives you full access to interview problems reported within the last week.

  • Full problem statement and constraints
  • 2 more worked examples, explained
  • Guided hints and editorial
  • Run your code on real test cases
$8.25/month

$99 billed yearly — or $19 month-to-month. Cancel anytime.

Free plan — 2 of 2 free unlocks used this week
See Amazon hiring insights
CodePython 3
Run and Submit unlock with Pro
FastPrep Pro
Reported in 1 Amazon interview this week

Unlock this recently reported problem

FastPrep Pro gives you full access to interview problems reported within the last week.

  • Full problem statement and constraints
  • 2 more worked examples, explained
  • Guided hints and editorial
  • Run your code on real test cases
$8.25/month

$99 billed yearly — or $19 month-to-month. Cancel anytime.

Free plan — 2 of 2 free unlocks used this week