Skip to content

Instantly share code, notes, and snippets.

@bazscott
Created October 8, 2013 14:16
Show Gist options
  • Save bazscott/6885393 to your computer and use it in GitHub Desktop.
Save bazscott/6885393 to your computer and use it in GitHub Desktop.
A couple of interview questions that I have been asked
A Bad Logic Question
--------------------
- I was asked this by the Royal Air Force, just after the interviewer threw a bunch of keys at me unexpectedly :)
Question: Assume there is a room with three light bulbs in it. Outside the room is a light switch with 3 switches on it labeled A, B, and C. Once you enter the room, you will no longer be able to access the switches. How can you, upon entering the room, tell me which of the three switches controls each of the light bulbs?
A Good Logic Question
---------------------
- Source: http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html
Question: Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment