Packing — Puzzle for Interview Rounds

Question :

There are 10 boxes with a combined weight of 75 kg. Their individual weights (in kilograms) are 15, 13, 11, 9, 8, 4, 2, 2 and 1.

You have to pack the boxes into three crates but each crate can hold a maximum of 25 kg. The boxes with weights 9 kg, 10 kg and 11 kg must be in different boxes. The boxes with weight 2kgs cannot be paired with the 13 kg weight box.

What arrangement should be used?

Solution :

Boxes in boxes!! Let us try and solve this.

There is only one arrangement available. One of the bigger boxes will include the 15 kg box and the 10 kg box. The second bigger box will include 13 kg, 11 kg and 1

kg box. The final bigger box will hold the 9 kg, 8 kg, 4 kg and the two 2 kg boxes.

Place a single red ball in one jar, say jar 1, and all the remaining balls in the other jar, say jar 2.

  • For jar 1, you will have a 1/2 chance of picking jar 1, and then 1/1 chances of it being the red ball.
  • For jar 2, you will again half 1/2 probability of selecting the jar 2, and then 49/99 chances of picking up a red ball.

Total chances are : 1/2 + (1/2)(49/99)

which gives 74/99, almost 3/4 chances of picking a red ball.

Thanks for Reading

Placewit grows the best engineers by providing an interactive classroom experience and by helping them develop their skills and get placed in amazing companies.

Learn more at Placewit. Follow us on Instagram and Facebook for daily learning.




Upskilling students for tech placements!

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Second Week of Coding…

Installing IBM DOC 4.0.0 from scratch on Windows: a video tutorial

However, Harbaugh’s window of opportunity to build Michigan Football

A Strategic Take on Cloud Storage Solutions — Part 3: Block Storage Optimization and Comparison

Reconnaissance with geo2ip and reverse-whois

WLSDM & WL-OPC WebLogic Monitoring Solutions: Customer Questions and Answers

C++ Advanced (1)

Python String interpolation

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


Upskilling students for tech placements!

More from Medium

LeetCode 146. LRU Cache

Everything about binary search trees- Insertion, Deletion, searching, time complexity

Leetcode 701. Insert into a Binary Search Tree

Leetcode 1 — Two Sum