Fog Creek Software
Discussion Board




technical riddles

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?

Please let me know if anybody has an answer to this.
Thanks
kms

kms
Monday, March 22, 2004

It's pretty straightforward if you've heard of a Gray code.

http://www.nist.gov/dads/HTML/graycode.html
http://mathworld.wolfram.com/GrayCode.html

Ham Fisted
Tuesday, March 23, 2004

That's the problem with these riddles... they're all pretty straight forward if you know the answer. Personally, I think these are terrible questions to ask a serious candidate.

Dave
Friday, June 18, 2004

*  Recent Topics

*  Fog Creek Home