mockers
Would you like to react to this message? Create an account in a few clicks or log in to continue.

One in One out - Google interview question?

2 posters

Go down

One in One out - Google interview question? Empty One in One out - Google interview question?

Post  Beagle Wed Feb 04, 2009 4:41 pm

You have an empty room, and a group of people waiting outside the room. At each step, you may either get one person into the room, or get one out. Can you make subsequent steps, so that every possible combination of people is achieved exactly once?

Beagle

Posts : 40
Join date : 2009-01-30

Back to top Go down

One in One out - Google interview question? Empty Re: One in One out - Google interview question?

Post  Admin Fri Feb 06, 2009 1:18 am

imagine this for 3 people.
000
001
011
010
110
111
101
100

where the nth bit represents whether nth person is inside or not.
if u remember this was GREY CODE.

Admin
Admin

Posts : 47
Join date : 2009-01-29

https://mockers.forumotion.com

Back to top Go down

One in One out - Google interview question? Empty Re: One in One out - Google interview question?

Post  Beagle Fri Feb 06, 2009 3:31 am

Bingo Admin Smile

Beagle

Posts : 40
Join date : 2009-01-30

Back to top Go down

One in One out - Google interview question? Empty Re: One in One out - Google interview question?

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum