# Code In Action

## Interview Puzzle, Gold for 7 days with 2 cuts

Let's assume, you have given a gold bar of 7 kgs weight, with indicators (a line) for every one kg. You need to give the gold to your friend, such that you are allowed to give 1 KG of gold every day for 7 days. First Day, he will have 1Kg, 2nd day 2kgs, 3rd day 3kgs and at 7th day he will have 7kgs.

The restriction here is you can cut the gold bar only 2 times, not more than that. let's think how to solve this puzzle?

1. First of all you need to understand that, it is a puzzle, which means it won't give you complete details. To solve puzzles kind of these, you need to think out of the box. Out of the box means thinking different possible ways.
2. The first thought, you'll get into your mind is cutting the gold bar into 7 equal pieces. So you'll try to cut the bar into middle and you'll be only having one cut remaining and cutting the remaining pieces into 7 equal bars will never possible.
3. You need to think about the solution in different way, with respect to the real world, just like when ever you go to a shop, and if you had made a bill of 400 rs and if you have 500 rs, you'll take 100 rs back from shop keeper. Let's think in this scenario. The actual solution is below.
4. First cut the gold bar into 3 pieces with 2 cuts. i.e 1 kg, 2 kg, 4 kg.
5. 1st day you'll give 1 kg, and you'll have 2kg, 4kg.
6. 2nd day you'll give 2kg and you'll take back 1kg you've already given. so you'll have 2kg, 4kg, and your friend will have 2 kg with him at 2nd day.
7. 3rd day you'll give 1kg and you'll have 4kg piece with you and your friend will have 3kgs totally at day 3.
8. 4th day you'll give 4kgs and you'll take the 1kg, 2kg piece from your friend. so now you'll have 3 kgs with you and your friend will have 4 kgs on 4th day.
9. 5 th day, you'll give 1kg, so your friend will have 5kgs totally and you'll have 2 kgs left with you for next two days.
10. at 6th day, you'll give 2kgs and takes 1kg back, now you'll have 1kg left and your friend will have 6 kgs with him on 6th day.
11. finally at 7th day, you'll give 1 kg back.

The pictorial representation is below.

I was asked this puzzle in an interview. I didn't solve this puzzle at that time, after that i did a google search and found the solution.