A person is working for you for five days, and you should pay him a gold bar at the end of every day. It should be done in a way that you make the fewest number of cuts from the one big gold bar you have, which will allow you to pay him 1/5th each day?


Updated: Nov. 27, 2020 — Training Time: 1 Minute
Overseen by: Archangel Macsika

Topic: Data Science.

Difficulty: Easy.

Companies who previously asked this: -

Objective: Four people A, B, C, D need to cross a bridge at night, and they have only one torch. The bridge is too dangerous to cross without a torch and is strong enough to support a maximum of two people at a time. They take 1, 2, 5 and 8 minutes respectively. What is the shortest time needed for all four of them to cross the bridge?

Short Answer: 2 cuts.

Full Solution

Make 2 cuts on the big gold bar to get 3 pieces such that we have one of 1-unit gold bar and two of 2-unit gold bar.

On the first day, give out the 1-unit gold bar.

On the second day, give out the 2-unit gold bar and collect the 1-unit gold bar from the previous day.

On the third day, give out the 1-unit gold bar.

On the fourth day, give out the second 2-unit gold bar and collect the 1-unit gold bar from the previous day.

On the fifth day, give out the 1-unit gold bar.

Was this training resource helpful?