Tech-Interview Riddles
An anonymous submitter writes "A computer engineering student at UC Berkeley has made a comprehensive archive of riddles from technical interviews. Very challenging and loads of fun. Also useful for interview preparation."
I sampled a few of the "relatively hard" puzzles... They're interesting, but they only take a minute to figure out. Am I correct in thinking that these are relatively easy, or am I being an ass and flaunting my ability to solve little puzzles?
(In case of the latter, do you want to hire me? I live in Cleveland and go to Cornell University...)
I used to put this one on my programming tests. It's actually shocking how many people get it wrong...
You are writing a parser that reads a C program and translates all the variable names into new names of the form "VAR######", where ###### is an integer incremented for each unique variable name. Discuss what is needed for the case where the C program already contains a variable of the form "VAR######".
Sometimes it's best to just let stupid people be stupid.
Sadly the site doesn't include the answers to the riddles... Kinda pointless, like sex without an orgasm. It's not rewarding to challenge myself if I have no way to determine whether or not I was correct.
It's Turing complete. It weeps, it bites, it smiles and it loves. It can be made, it can be had, it can be taken. It was one, it was two then it became sixty two. It needs time, it need paitence it needs to be pruned. When time comes it needs a fourier series to make it look good. What is it?
A stick of incense takes exactly one hour to burn out. Given nothing but a lighter and three sticks of incense, how can you accurately measure 1 hour and 45 minutes of time?
Wear one condom. Wear the 2nd one outside the first one. Have sex with 1st woman.
:-)
Remove the 2nd, outer condom, have sex with the 2nd one with just one condom (the 1st one).
Fold the just removed condom inside out and wear it over the 1st one. Have fun with the last woman.
Who says that you can't use "Economic engineering" knowledge on bed,
If this is the correct answer, then I would be at an unfair disadvantage answering this question. Because I *listened* in sex ed when they said that using two condoms at the same time was dangerous. It's too likely that air will get caught between the condoms. Some parts will stick and some parts will stretch, leading to two broken condoms.
There are no trails. There are no trees out here.
What is:
Greater than god
More evil than the devil
Poor people have it
Rich people want it
If you eat it, you'll die?
If all you have is a hammer, everything looks like a nail.
Karnaugh Maps (brought to you by CSE 120 at ASU):
Your problem:
!B!C !BC BC B!C
A-----------------
0 | 0 0 1 0
1 | 0 1 1 1
Answer: BC | AB | AC
Ta da!
'this industry', meaning network admins who focus on web sites only, right? Not admins or programmers in general?
Because I'd have an easy time talking about all of that stuff, but I know people as or more intelligent than I am that wouldn't simply because they haven't been exposed to any of that directly.
It seems to me your question is flawed. You're asking too much about details that can be learned by any intelligent technical individual in a matter of days. Just because they don't know the answer when you ask it doesn't say shit about how good they might be at the job, especially if the job is something more than simple web admin.
There's many possible answers, so how do I know if I've got the answer they want? He's in a heavily forested area, so grabbing a log and paddling out around the fire shouldn't be hard. Or he could dig a little moat, though that might not be too effective. So, is there some other, clever answer, I should look for, or am I done? Grrrrrrrrr!
"I am a cipher, a cipher, wrapped in an enigma, smothered in secret sauce" -Jimmy James
This site contains answers to many of the microsoft questions.
i ?a ction=topics&number=3
http://www.acetheinterview.com/cgi-bin/qanda.cg
i suppose the answer to many riddles is, look it up on google?
If one has 1-6 and the other has 7-9/0-2, then how do you represent 7 as 07 (which was a requirement IIRC)?
The right answer seems to be {0,1,2,3,4,5} and {0,1,2,6,7,8} since you can turn the 6 to 9 and vice versa. Then you can represent %02d representation of [1,31].
There are three vending machines. One dispenses only Cokes, one dispenses only Pepsis, and one dispenses either Cokes or Pepsis at random. Someone rearranges the labels on the machines so that none of the machines are labeled correctly. Given that you have no prior knowledge of which machine is which and no way to open the machines, how many drinks will you have to buy to determine which machine is which?
To many, total abstinence is easier than perfect moderation. -- St. Augustine
Funny, I had a similar interview for a question at a consulting company. It was basically another 'estimation' type question.
My first answer was that I'd check google. They didn't like that at all, saying that they needed to be able to come up with these stats quickly, and that an employee shouldn't have to rely on anything. I said that part of solving a problem is knowing when to NOT reinvent the wheel and using information that's readily available.
Didn't get a second interview either. Not even a phone call saying thanks for interviewing.
Personally, I love interview puzzles and riddles. But I HATE people who refuse to accept an answer different from the one they have written down. That's not the point. An interview puzzle's supposed to give you an idea of how a person solves problems...not how quickly they solve it the "right" (*snicker*) way.
Those points are true if you're hiring a contractor to come in, do a job, and get out. They are not true if you're hiring a flexible team player who is going to handle a demanding job which is guranteed to throw new challenges on a daily basis.
Please. Do you really think some silly-ass riddles will separate the wheat from the chaff? In a previous life, I was an air traffic controller (9 years). I was thrown new challenges several times an hour. I don't recall riddles being asked on my interview.
I can tell you, however, that the three months of indoctrination in Oklahoma City was a head game unto itself. The point being it took three months to sort the psychologically strong from the weak. I seriously doubt a few puzzles on an hour-long interview is going to tell you much of anything.
------ Exercise Instructions
Dear Candidate,
This exercise is intended to break the monotony of the standard interview questions like "Tell me about your strengths and weaknesses." Please read this document thoroughly before you start!
Your instructions are simple: Build something using the Lego Mindstorms Robotics Invention System and then tell us about your experience!
There are no constraints on the simplicity or complexity of your project though you are expected to do programming as well as mechanical assembly. You are free to use the examples in the kit or the provided documentation (O'Reilly Mindstorms book) as a starting point.
System Setup
The computer has the Lego Mindstorms software loaded and tested.
The firmware has been loaded into the RCX module and tested. COMM 1 is working for the IR Module connection. Batteries should be good (let us know if you have system problems - they are not part of the exercise!).
In addition, on the computer is an additional programming system called RCX Command Center (Version 3.1) that uses NQC (Not Quite C) and a graphical interface for programming. This has also been tested and documentation is provided. You are free to use either the Lego software or RCX Command Center for programming your robot. The CD-Rom case has instructions on how to bypass the Lego Tutorial.
Presentation
At the end of the exercise you will give a presentation and demonstration (5 -10 minutes) of your project. Feel free to use the whiteboard and/or flipcharts for your presentation if needed. Please address the following topics in your presentation:
How did you set about the exercise in terms of planning, architecture, and construction?
What did you intend your robot to do and what does it really do? Why?
What obstacles did you encounter during construction? How did you overcome or bypass them?
What would you do different if you were given another session?
There is no "right answer" to this exercise and there are no hidden tricks or traps. The intent is to give you an opportunity to show your creativity, learning skills, problem solving, time management, and explanation skills in a different way.
Please have FUN!
"I say we take off, nuke the site from orbit. It's the only way to be sure."