## Adobe Interview Question Developer Program Engineers

• 0

There are two person A with Lock L1 and B with Lock L2 and a messenger M two send the box from one end to another. How to send the box so that M can never open the box.

Country: India
Interview Type: In-Person

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

Step 1: A will lock the box with KeyA than send it to B
Step 2: B on receiving locks it again with KeyB and send it to A
Step 3: A will release its lock with its KeyA and send it back to B(its is still locked with KeyB).
Step 4: B upon receiving will open it with KeyB.

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

There are a lot of loop-holes in the question. It can either be exploited as an interviewee, or the answers can be countered by the interviewer.
Your solution is correct, however, I might ask, where is it written that more than one lock can be put on the box?

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

I think more than 1 lock can be put on the box is not really a problem.

How ever, this answer can be exploited by M as follow:
1. M doesn't send the box to B,
2. M locks it with his fake KeyB and send it back to A
3. A release the LockA
4. M open the box with his fake KeyB.

If the locks cannot be faked then the given answer should be correct :-)

Comment hidden because of low score. Click to expand.
2
of 4 vote

Another possible solution could be :

Step 1: A will lock the box with KeyA than send it to B
Step 2: B on receiving keeps the box and send the messenger back to get the key.
Step 3: A send the key.
Step 4: B unlocks the box using the key.

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

hahahaha clever! :D

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

messenger ant send the keys

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

Key should not be shared with messenger.

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

it is also possible that messenger didn't deliver the box to B, or gave a wrong box and then asked for the key from A, not a correct solution.

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

can you elaborate the question?

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

nice one !!!

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

hahhahh Awesome Anonymous :)

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

nice!!!

Name:

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

### Books

is a comprehensive book walking you through every aspect of getting a job at a top tech company, while focuses on software engineering interviews.

### 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.