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

Consumer Driven Contracts with Pact

Intro. “SVC” the better pattern against “MVP”

How to add Point Vector Layer Using PyQGIS

Alibaba Cloud Achieved Large-Scale Implementation of Serverless in Core Business Scenarios

8 Meaningful DevOps Metrics You Should Trust

You have a list of integers, and for each index, you want to find the product of every integer…

My experience at Google code-in 2018

Firebase, Cloud Messaging

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

Sorted Insert for Circular Linked List

Graph Algorithms

LeetCode 146. LRU Cache

Fastest Horses