## Morgan Stanley Interview Question for Development Support Engineers

Comment hidden because of low score. Click to expand.
6
of 6 vote

I believe the solution is as follows (assume initial configuration to be an empty bucket at the top and a bucket with the stone in it at the bottom):

1. Prince goes down, rock goes up.
2. Queen goes down, Prince goes up.
3. (the rock is dropped from the top of the tower)
4. King goes down, Queen and rock go up.
5. (the rock is dropped from the top of the tower)
6. Prince goes down, rock goes up.
7. Queen goes down, Prince comes up.
8. (the rock is dropped from the top of the tower)
9. Prince goes down, rock goes up.

Comment hidden because of low score. Click to expand.
0

Comment hidden because of low score. Click to expand.
0

correct !!

Comment hidden because of low score. Click to expand.
0

After Step 5 Config is : Prince and Queen at the top. Since stone is dropped the pulleys are at same position.
Step 6 is useless they try with step 7 directly instead.

Comment hidden because of low score. Click to expand.
1
of 1 vote

I think Anonymous on January 26, 2011 is correct. Just repeat:

1. Prince in one basket and stone in the other. Prince down. Stone up. Prince stays on the ground. Leave the stone at the top.
2. King in one basket and Queen plus stone in the other. King down. Queen and stone up. King stays on the ground. Queen and stone at the top.
3. Queen in one basket and prince in the other. Queen down. Prince up. Queen stays on the ground. Prince at the top.
4. Prince in one basket and stone in the other. Prince down. Stone up. Prince stays on the ground.

Comment hidden because of low score. Click to expand.
0

Not going to work. King, Queen and stone are all at the top. First you'd have to pull a basket up, which, even if allowed, will result in two baskets up top. Then King, Queen and stone will all drop. I'd guess they'd break the rope.

Comment hidden because of low score. Click to expand.
0
of 0 vote

Prince goes down alone. Then Queen and stone in one basket, and king in other, King will reach down. Remove stone, and Prince climbs in. in one, Queen in other. Queen will reach down, Prince will go up. Now stone in one basket, Prince in other, Prince will reach down. :)

Comment hidden because of low score. Click to expand.
0

I think you have to assume that initially the one bucket is empty and sitting at the top of the pulley, and the other is on the ground with the stone in it. When the prince goes down, you just can't say that you then put the queen and stone in one bucket and the king in the other, because one bucket is always on the ground.

Comment hidden because of low score. Click to expand.
0
of 0 vote

1. King in basket1 (78) and queen + stone (72) in basket2 ... king goes down
2. Queen in basket1 (42) and prince in basket2 (36) ... queen goes down
3. Prince in basket1 (36) and stone (30) in basket2 ... prince goes down

Comment hidden because of low score. Click to expand.
0

This solution is ignoring the initial condition. The stone is in one of the baskets. This basket must be at the bottom so no one can immediately get in the basket with the stone.

Comment hidden because of low score. Click to expand.
0

I think if one basket with stone is down and one without stone is up. Then any one can pull it up with puly. I think this is solution with minimal steps.

Comment hidden because of low score. Click to expand.
0
of 0 vote

hey why bother about the stone?

keep the king (78kg) in one basket and in another basket queen(42kg) and prince(36kg) that is 42+36=78.

The weight is equal so there is no problem :)

Comment hidden because of low score. Click to expand.
0

not possible as working of pulley will be based on some difference in weight otherwise all will be hanging in air...

Comment hidden because of low score. Click to expand.
0
of 0 vote

Since one of the baskets got 30 kg stone, it is at the ground. Following sequence will bring all 3 down:

1. Prince (36 kg) gets into basket, it will come down to ground and basket with 30 kg stone will reach top.
2. King unloads stone and queen gets in, basket with prince (36 kg) will come to top and queen (42 kg) on ground. Queen stays on ground.
3. King (72 Kg) gets into one basket, prince and stone (36kg + 30kg) in the other. King reaches safely. Now both king and queen are on ground.
4. Prince changes basket. He comes down as other basket got 30 kg rock.

All 3 reach ground safely.

Comment hidden because of low score. Click to expand.
0

King's weigth is 78 and NOT 72

Comment hidden because of low score. Click to expand.
0
of 0 vote

The question is essentially a Hanoi Tower problem

Comment hidden because of low score. Click to expand.
0
of 0 vote

1. Queen in basket1, goes down. Basket2 will goto top. Queen land in the ground, so basket2 will come down. Now queen will get into basket 2 (30kg + 42kg).
2. King (78 kg) will get into basket1 and comes down. King will land in the ground. Basket2 will come down, so queen can also land in the ground.
3. Prince get into the basket1 and comes down.

Comment hidden because of low score. Click to expand.
-1
of 1 vote

prince goes down and calls 911 and in the mean time it's the king and queens problem to get out. no worries

Comment hidden because of low score. Click to expand.
0

Awesome..
Thats an out of box solution.

Comment hidden because of low score. Click to expand.
0

Try answering that to the interviewer..

Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

### Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

### Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

### Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

### Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.