Ebay Interview Question
Software Engineer / DevelopersTeam: Traffic
Country: United States
Interview Type: In-Person
Yes.
Cut should be always on power of 2's. same can be expanded to any number of days .
2^0=1000
2^1=2000
2^2=4000
2^3=8000
and so on... based on the max value.
for the sake of convenience, I am assuming the plate is in a square shape, so thin as a paper, but it can be of any other shape.
1st Cut: 1st day: Cut the 1000 $ worth of plate to pay
2nd cut: 2nd day: fold the paper in 6 folds with equal size(fold vertically such that its length remains same), each fold worth is 1000$. Now cut the folded paper from the centre along the length not the breadth wise. This will you 6 equal pieces, which are enough to pay.
I have checked cutting a sample paper folding like I explained and it works. Let me know if you have any questions on it...Thanks!!
You need to have an agreement with the contractor that he doesn't sell off the gold pieces you give him till the end of 7th day
- Anonymous January 08, 2014Piece 1: $1000 (1st cut)
Piece 2: $2000 (2nd cut)
Remainder - P3: $4000
Day 1: P1
Day2: Take P1 back, Give P2
Day3: Give P1
Day4: Take P1+P2, Give P3
Day5: Give P1
Day6: Get P1 back Give P2
Day7: Give P1