Slashdot Mirror


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

747 comments

  1. Riddle me this Batman by Anonymous Coward · · Score: 0

    What is the riddle that no one has solved?

    1. Re:Riddle me this Batman by seosamh · · Score: 2

      The one whose answer is 42.

  2. "Microsoft was responsible" by siliconshock.com · · Score: 4, Funny

    I believe Microsoft was responsible for popularizing the usage of riddles in interviews

    Yes, but they still have not been able to find anyone who can solve the "why does windows crash" riddle!!

    1. Re:"Microsoft was responsible" by Anonvmous+Coward · · Score: 2
      Yes, but they still have not been able to find anyone who can solve the "why does windows crash" riddle!!
      Gravity!!!

      Heh. :)
    2. Re:"Microsoft was responsible" by nsideops · · Score: 0

      This site seems pretty annoying if answers aren't given. Something to see if you are right or wrong on the harder questions.

      --
      Teach someone to use the net and they won't bother you for weeks; show them Slashdot and you may never see them again.
    3. Re:"Microsoft was responsible" by Fat+Casper · · Score: 2
      they still have not been able to find anyone who can solve the "why does windows crash" riddle!!

      They found a lot of them. They just didn't hire any of them.

      --
      I spent a year in Iraq looking for WMD and all I found was this lousy sig.
    4. Re:"Microsoft was responsible" by IdleTime · · Score: 1

      That is because everyone capable of fixing the problem is currently developing for Linux :-P

      --
      If you mod me down, I *will* introduce you to my sister!
  3. more info... by onby2000 · · Score: 5, Informative

    for more tech interview questions and answers try http://www.techinterview.org/

    1. Re:more info... by levik · · Score: 2

      [plug] I recently made a site for riddles/questions of this type, if anyone is interested. http://www.flooble.com/perplexus/ [/plug]

      --
      Ñ'
    2. Re:more info... by Anonymous Coward · · Score: 0

      Does anyone have a site with good answers to stupid form interview questions like
      "Describe how you handled a situation where a co-worker was not performing adequately."
      "What is your career goal?"

      Etc. you know, the ones that simply don't have a good answer, or if they do don't have a meaningful answer. If I get form questions, might as well give them form answers.

  4. Why do interviewers use "riddles"? by Turing+Machine · · Score: 5, Insightful

    What's up with using this type of question for interviews, anyway? Sure, they can be fun, but they're perfectly useless as far as telling whether someone can actually write solid code. 9 times out of 10, all they tell you is whether the interviewee has heard that one before.

    To interviewers: Do you really think that the answers to these questions don't spread through the entire department within 15 minutes after your first interview? I realize that "knowing the answer" makes you feel smarter than the prospective employee in some sense, but how about actually doing your job for a change?

    1. Re:Why do interviewers use "riddles"? by Brant · · Score: 3, Insightful

      You've got to use the right questions. As someone else has pointed out, there's a great web site called techinterview.org that has similar questions. They talk about something called the "aha factor". If something has a high aha factor, then you'll only get it if you've heard the question before. These aren't very useful as interview questions.

      If something has a low aha factor, then it's a useful question even if they've heard it before. The idea is to watch the interviewee's reasoning process, not to make sure they get the right answer. When I interview people, I ask these types of questions. I find it an invaluable probe of their ability to reason and think logically.

      One of my favourites is this:
      "How many trailing zeroes are there on 100! (100! = 100x99x98x97x...x3x2x1)."

      Try it. It's reasonably straightforward to get, but you have to show an understanding of factoring and multiplication to get it. The answer is on techinterview.org if you want to check yours.

      Scott

    2. Re:Why do interviewers use "riddles"? by Stinking+Pig · · Score: 3, Insightful

      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.

      If you're hiring the latter type of person, you want to know how they'll react to not knowing the answer in a high stress situation. I've done a lot of interviewing for sales engineering positions, and I can tell you some good ways to not get hired when this question comes up:
      a) lie, convincingly or otherwise
      b) go silent
      c) act like a teenager trying to ask for a date.

      The proper response for me at least is to say "I don't know, but based on these things I do know, this is what I think." I choose people for the way they think in addition to what they know, because that tells me something about what they'll be able to learn.

      That said, most interviewees never make it to a question like that because they get stumped on my initial tech question after "how are you and where did you work before":

      "Describe in as much detail as you are comfortable using exactly what happens from a network perspective when you use that laptop to visit a web site. I'm looking for which packets go where."

      If you tell me about ARP, DNS, and HTTP and you can name the port numbers and transport layers, that's fine. DHCP, load-balancing, firewalls, SSL, proxy servers, server-side processors, databases, that's all extra credit. If you can't talk about these things, you're not yet ready for a professional career in this industry.

      --
      "Nothing was broken, and it's been fixed." -- Jon Carroll
    3. Re:Why do interviewers use "riddles"? by Anonymous Coward · · Score: 0

      Just because you are too stupid to answer questions on the spot doesn't mean everyone can't.

      Don't worry, though -- I'm sure your personality and dedication will win out against the value of those people who were actually smart enough to deal with tough questions when layoff time comes.

    4. Re:Why do interviewers use "riddles"? by MayorQ · · Score: 2, Insightful

      True, while these questions do not answer "Can this candidate code well?" they can provide insight into how the candidate thinks. They are merely "thinking" questions and are only useful if the candidate thinks outloud. It lets you see how they think and how they attack a problem. Are they being logical? If they can logically put several thoughts together, they can code in most any language. Learning syntax is a given.

      - MayorQ

    5. Re:Why do interviewers use "riddles"? by Turing+Machine · · Score: 3, Insightful

      Would you guys feel comfortable going to a lawyer or doctor who'd been hired on the basis of his answer to a bunch of "brain teasers", or would you opt for the doctor or lawyer who'd, oh, I don't know, actually been asked questions about law and medicine?

      Asking about TCP/IP is fine. Asking about sorting algorithms is fine. Asking "how would you lay out a data structure to represent this problem?" is fine.

      Asking goofy questions about the shape of manhole covers is idiotic (especially since the "official" answer to that question is dead wrong).

    6. Re:Why do interviewers use "riddles"? by Anonymous Coward · · Score: 0

      Great. Too bad the answer they gave is wrong. Its actually 24.

    7. Re:Why do interviewers use "riddles"? by jalewis · · Score: 1

      What is the "official" answer?

      What is the real answer?

      I probably sound like and idiot, but I am curious to know what you think the real answer is.

    8. Re:Why do interviewers use "riddles"? by Anonymous Coward · · Score: 1
      "Describe in as much detail as you are comfortable using exactly what happens from a network perspective when you use that laptop to visit a web site. I'm looking for which packets go where."

      If you tell me about ARP, DNS, and HTTP and you can name the port numbers and transport layers, that's fine. DHCP, load-balancing, firewalls, SSL, proxy servers, server-side processors, databases, that's all extra credit. If you can't talk about these things, you're not yet ready for a professional career in this industry.

      Where "industry" == network engineer, a career field with about as much creativity as stamp collecting. There are much more interesting jobs in the computer world. Only some of them require knowledge of ARP, DNS, and all your other network-cock-size-contest acronymns.

      HAND.

    9. Re:Why do interviewers use "riddles"? by Dahan · · Score: 2
      Great. Too bad the answer they gave is wrong. Its actually 24.

      Heh, really... there's no way there are 100 factorial trailing 0s in 100 factorial :) And there aren't 100 trailing 0s either. You get a trailing 0 for each time you have a 2 times a 5. If you take the prime factorization of each number between 1 and 100, there are gonna be more 2s than 5s, so we'll just count the 5s. There are 20 multiples of 5 between 1 and 100. However, multiples of 25 contribute two 5s, so add in 4 more for the multiples of 25. Answer = 24.

      BTW, 100 factorial is:
      93326215443944152681699238856266700490715968264381 62146859296389521759999322991560894146397615651828 62536979208272237582511852109168640000000000000000 00000000

    10. Re:Why do interviewers use "riddles"? by MisterBlister · · Score: 4, Interesting
      If you tell me about ARP, DNS, and HTTP and you can name the port numbers and transport layers, that's fine. DHCP, load-balancing, firewalls, SSL, proxy servers, server-side processors, databases, that's all extra credit. If you can't talk about these things, you're not yet ready for a professional career in this industry.

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

    11. Re:Why do interviewers use "riddles"? by Turing+Machine · · Score: 4, Informative

      The "official" answer (which Microsoft was still using as recently as a couple of years ago, according to some friends of mine who interviewed there) is so the covers won't fall through the hole.

      This answer fails on at least two levels:

      1) There are plenty of manhole covers (or manhole-cover-like-objects) that aren't round. If you've been observant enough to notice this, you fail.

      2) There are plenty of other curves of constant width; an infinite number, in fact. The old Wankel rotary engine used such a shape. Though a circle is the only curve of constant *radius*, that's not the issue. If you know enough math to realize this, you fail.

      Another possible answer is that it makes it easier to roll a heavy cover out of the way. Again, one of the other curves of constant width would do just about as well.

      The REAL answer is that no one knows.

      Personally, I think Microsoft would be better off asking people why using fixed-sized buffers for user input is a bad idea, but hey.....

    12. Re:Why do interviewers use "riddles"? by Anonymous Coward · · Score: 0

      I recall this in an imponderable, which is a pretty interesting book, sorta like straight dope, in book form. The logical answer is that a round cover with a lip won't fall down the hole. In reality, there are many old covers of all shapes, I think it was different companies that used their own shape as a sort of trade mark.

    13. Re:Why do interviewers use "riddles"? by Anonymous Coward · · Score: 0

      > One of my favourites is this:
      "How many trailing zeroes are there on 100! (100! = 100x99x98x97x...x3x2x1)."

      If you were to ask me such a stupidshit question during an interview, I'd terminate that interview at once - who in the world wants to work for someone who asks such clueless questions about a programmer?

    14. Re:Why do interviewers use "riddles"? by Anonymous Coward · · Score: 0

      Especially when he doesn't even know the right answer.

    15. Re:Why do interviewers use "riddles"? by Latent+IT · · Score: 2

      The... answer... they... gave... was... 24...

      So, I guess I don't see your point.

      From the site: So if I'm counting correctly, that'd be 10 + 10 + 1 + 3== 24 zeroes.

      So uh... yeah.

    16. Re:Why do interviewers use "riddles"? by bm_luethke · · Score: 1

      While true, a circle is about the most effecient form one could use given what a manhole is for. When first made - easy to produce (not necessarilly easy than others). What it does have is two things - 1: very efficient use of materials. Basically a circle does not have any wasted material to either cut out or produce and fits a person and thier tools quite well. And secondly, much less smarts needed for design. Sure there are other shapes that roll easy (though from experience pulling manhole covers rolling easy makes them harder to open, though once open they are good), doesn't take a lot of work to design, and many times you only want to look into the sewer so just rotating the manhole in place is the thing to do (a circle being easy to do this). Basically a circle is the best intersection of these qualities, though not the only one that has them.

      Non circle openings in the ground tend to be more specific purpose (basically we have this shaped equipment to get down there and a circle would need to be too large - say moving something square for example). From the engineers I worked with before getting a CS degree that was thier opnion on things (I was working on a surveying crew laying out the easements and cut lines for a fibre-optics exchange box that was underground - discussion about what shape to make the hole - we needed to calculate and set points for the crew to dig. They of course expressed reason to not be a circle and I am extrapolating backwards).

      --
      ------- Sorry about the spelling, I suffer from two problems. Dyslexia makes it difficult to spell well, lazy makes it
    17. Re:Why do interviewers use "riddles"? by kiscica · · Score: 1

      Actually, the best answer I ever heard to the question "why are manhole covers round?" is...

      ...because manholes are round.

      Kiscica

    18. Re:Why do interviewers use "riddles"? by Anonymous Coward · · Score: 1, Insightful

      Microsoft may ask riddles in interviews, but most interviewers are not looking for "official" answers. In fact, the actual answer should be irrelevant. Instead, the interviewer is getting you to work while they watch how you respond to the situation. They are more interested in *how* you think than if your answer matches.

      When I interviewed, the interviewers were interested in and impressed by my creative, non-standard answers and the questions that I asked of them. It didn't matter that I didn't give the "standard" answer on most of the questions. What did matter was my emotional reaction to a difficult problem, my approach to solving the problem, and the questions that I asked of them.

      Also, interviewing isn't restricted to HR. At MS, the individual employees (managers and individual contributors) across the company are involved in interviewing and they each come up with their own questions.

      You can focus on code centric questions, but will that person still perform well if they move to writing specs, managing people, or developing an advertizing plan?

    19. Re:Why do interviewers use "riddles"? by Latent+IT · · Score: 4, Informative

      Well, crikey. But ask yourself this - if not round, well, what?

      Okay, so you're a guy, and you have to put a hole in the street, and put a cover on it. What shape do you make it? Triangular? Well, uh, why? It's pointy, and can fall through the hole. So you wouldn't do that. Square? Well, you really can't roll it, and TRUCKS have to drive over it, so it'll be heavy, so you'd *want* to roll it, rather than heft it.

      Hey, circles can roll.

      Oh, yeah. And that crap about a Wankel. Why would you want to fiddle around in traffic trying to get it to be oriented properly when a circle HAS a constant radius, as you point out? You can thump it down any old way. Fits!

      So, answer: Because it's just better than any other shape.

    20. Re:Why do interviewers use "riddles"? by Anonymous Coward · · Score: 0

      I'm inclined to agree mathematics puzzles aren't very useful for determining whether to employee a programmer.

      I have spent several years studying mathematics, including number theory and this puzzle was fun and easy for me (15 seconds?). However my co-worker who never graduated high school probably would consider the exercise one in stupidity and not even try to solve it, even in an interview.

      It's hard to measure but my co-worker is probably about 5 times more productive than myself. Well at least on my better days he's only 5 times faster.

    21. Re:Why do interviewers use "riddles"? by TheMidget · · Score: 1
      2) There are plenty of other curves of constant width; an infinite number, in fact. The old Wankel rotary engine used such a shape. Though a circle is the only curve of constant *radius*, that's not the issue. If you know enough math to realize this, you fail.

      However, among all those curves of constant width, a circular shape is easyest to manufacture. So, why waste good money on producing Wankel engine shaped manhole covers, when a simple circle would do the job just as well?

    22. Re:Why do interviewers use "riddles"? by cpt+kangarooski · · Score: 1

      I suppose then that you won't be happy to discover that the LSAT given to prospective law students contains a section of, IMO rather sadistic, logic games. (typically of the kind where, given several statements about the qualities of a group of things you have to correctly deduce all the qualities of all the things)

      But don't worry -- the LSAT has nothing to do with what you actually learn at law school. It's kind of weird that they even bother including such things.

      --
      -- This and all my posts are in the public domain. I am a lawyer. I am not your lawyer, and this is not legal advice.
    23. Re:Why do interviewers use "riddles"? by cwikla · · Score: 4, Insightful

      The problem with "light bulb" questions is that people tend to like to come up with their own ones, which usually tend to be crappy, or ones, as earlier mentioned, that someone stumped them on, and now they think they are clever for knowing the answer. Even "technical" questions sometimes fall into this one.

      Some experiences in my past:

      A couple of years ago I was asked: How many gas stations are there in the US?

      My answer: I don't know, I'd probably check a search engine.

      After I insisted that I couldn't come up with an answer on my own, I was informed that they were looking for people who "think out of the box" and only people that hazarded a guess made it to level two interviews.

      I laughed, and explained that if someone I was interviewing made up some bullshit answer with absolutely no backing I'd be afraid that would carry over to their real work and it was a silly prerequisite. Knowing where and how to find an/the answer can be even more useful then making up an unfounded answer. Lots of smart people out there. Lots of stuff already been done.

      Hmmm, come to think of it I never did get a second interview.

      Or the time I was asked to come up with a string hash function. So I quickly threw together a loop just adding all the bytes, shifting some bits each iteration. Simple, not great, not perfect, but a decent 10 cent solution. I was then walked through the "correct" answer that covered, number of bits in byte being used, average word length, etc, etc...and told this was the "correct" answer. Researching later, I believe the solution was either in a Knuth book, or was another Microsoft tidbit. But I'm sure the interviewer would have come up with the solution independently given the same question in the interview...

      Finally, my FAVORITE is being asked some hard technical question. You ponder, you falter, and come up with some sort of a solution, but aren't quite satisfied it. Of course the interviewer then informs you it's a problem they are currently working on and they are trying to come up with something themselves. Seems like you should be paid contractor rates at least for that part, no?

      I find that having people talk about their work, explain what they did, and WHY they did it pretty much can measure a candidate against your bullshit meter in a matter of minutes.

    24. Re:Why do interviewers use "riddles"? by qqtortqq · · Score: 1

      My dad got asked this in an interview once, they told him that the correct answer was that manholes (or peopleholes, if you prefer) are round because the round shape can handle stress better than any other shape. I suppose stress being force on the road, and force in the ground were to shift in an earthquake.

    25. Re:Why do interviewers use "riddles"? by The+Cat · · Score: 2

      Those points are true if you're hiring a contractor to come in, do a job, and get out.

      That's all employees now.

    26. Re:Why do interviewers use "riddles"? by Anonymous Coward · · Score: 0
      manholes (or peopleholes, if you prefer)

      I believe the correct gender-neutral rendering is access-holes. Good that you picked it up though ... you're hired.

    27. Re:Why do interviewers use "riddles"? by UncleFluffy · · Score: 3, Informative

      I only ask one "tech" question when interviewing prospective programmers:

      void echo(void)
      {
      char *s;
      gets(s);
      puts(s);
      }

      What is wrong with this code ?

      The scary thing is, over 50% of the people I ask can't answer it.

      --

      What would Lemmy do?

    28. Re:Why do interviewers use "riddles"? by JamieF · · Score: 2

      You make a good point about the "how do you learn things you don't already know" process that a person has. What I disagree with is the idea that skills aren't important, and that problem-solving ability is what matters since that will lead to the right solution. (Well, I guess it will, but only after you make all the same mistakes that have been made by your predecessors!)

      I suppose that my assumption is that someone with a certain amount of skill and knowledge of industry standard solutions to common problems got that knowledge somehow and so they must have a process for learning. But I like the idea of explicitly interviewing for that.

    29. Re:Why do interviewers use "riddles"? by sql*kitten · · Score: 2

      If you tell me about ARP, DNS, and HTTP and you can name the port numbers and transport layers, that's fine. DHCP, load-balancing, firewalls, SSL, proxy servers, server-side processors, databases, that's all extra credit. If you can't talk about these things, you're not yet ready for a professional career in this industry.

      These aren't useful questions, because port numbers and protocols are just something you can look up. I've used Unix for years, but I still grep /etc/services from time to time to look up a port number, and I look up stuff in the RFCs from time to time too. Your questions don't tell you anything about how the candidate would deal with a situation in which knowing the raw facts doesn't help, which is most troubleshooting situations.

    30. Re:Why do interviewers use "riddles"? by Anonymous Coward · · Score: 0

      It's because a round manhole can't fall through it's own opening, whereas a square one can, etc...

    31. Re:Why do interviewers use "riddles"? by JamieF · · Score: 4, Insightful

      >You can focus on code centric questions, but will that person still
      >perform well if they move to writing specs, managing people, or
      >developing an advertizing plan?

      Good, experienced developers should be really good at writing specs since they know what level of detail is needed. In fact I think they stand a better chance of writing an implementable spec than an Analyst who has never coded.

      As for managing people or developing an advertising plan, those are totally different skill sets from development. Have you ever worked with a manager who totally sucked as a manager but was a really smart developer? I have, several times. It's painful, and it drives home the point that managing well takes skill.

      The idea that you can just dump a bunch of smart people onto any problem and outperform a bunch of experienced people who aren't quite as smart strikes me as terribly naive. Or, in Microsoft's case, conceited: it's pointless to learn from the past because we're all smarter than they were. So we'll get it right the first time and come up with a more clever solution on our own than if we just READ A DAMN BOOK. And so you get badly designed, bug-ridden software that solves problems that were already solved better 10 years beforehand. Oops.

      Perhaps if you're truly working on something novel it would clearly be better to have smart people than not smart people, but in that case it's not possible to hire for experience anyway so it's not germane to this discussion.

      You want good ads, hire someone who's good at doing ads. You want a good manager, hire a good manager. Or, train someone who is partway there. But don't just throw bright young people at any task and assume that they'll do better than an experienced person. I've worked in companies where that was the explicit philosophy and it's a disaster. After a few nightmare projects that smart manager might figure out some techniques that a less smart manager took a lifetime to develop, but that less smart manager wrote it all down in a book 30 years ago. Don't you wish the smart manager had read it BEFORE their first project as a manager?

      Show me a chess club that can beat Marines at paintball and maybe you'll change my mind.

    32. Re:Why do interviewers use "riddles"? by troc · · Score: 1

      Or..

      maybe manholes are round because manhole covers are round?

      spooky

      Troc

      --
      Troc's dubious podcast and blog: http://www.trocnet.net
    33. Re:Why do interviewers use "riddles"? by RedWizzard · · Score: 2

      Due to the incredibly poor design of the site a number of people have obviously taken "Solution: 100!" as the answer and not as a link to the answer (which it is).

    34. Re:Why do interviewers use "riddles"? by Anonymous Coward · · Score: 0

      Speaking of which, I'm all of 15 years old and I could tell you about all this crap quite descriptively with no trouble and I deal with it in my $7/hr programming job. Sounds to me like somebody is getting hired to do what we all (where I work) consider nothing.

    35. Re:Why do interviewers use "riddles"? by Anonymous Coward · · Score: 0

      1) Using gets, you should use fgets because it won't allow you to overflow the buffer your reading to.

      2) using an uninitialised variable, a pointer that points to nowhere (or rather somewhere, you just don't know where)

      3) it doesn't check for return values and test for failure

      4) is that style of indentation allowed by the coding standards? (might have been screwed slighty in being posted)

      did I miss anything?

    36. Re:Why do interviewers use "riddles"? by krugdm · · Score: 2

      Because it's that shape of the people that climb down the holes?

    37. Re:Why do interviewers use "riddles"? by ed1park · · Score: 1

      Perhaps circular manhole covers also use the least amount of material for the most usable passage space, thus reducing overall production costs.

      I'm reminded that spheres have the lowest surface to volume ratio of all three dimensional objects.

    38. Re:Why do interviewers use "riddles"? by dillon_rinker · · Score: 2

      port numbers and protocols are just something you can look up

      In other words, either "I'm too stupid to remember stuff I've looked up fifty times" or "I'm so inexperienced that I haven't looked those up very much." If you don't KNOW that SMTP is 25 and HTTP is 80, I don't want you working on my mail or web servers.

    39. Re:Why do interviewers use "riddles"? by jeremyp · · Score: 2

      If I was interviewing a programmer, I would not expect them to carry the man page for gets(3) in their head. If you give them the man page, it gives away most of the answer. OTOH if they already know the semantics of gets(3), it probably means they have used it before in which case I would seriously consider showing them the door.

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    40. Re:Why do interviewers use "riddles"? by kaisyain · · Score: 2

      So you're a guy and you have to put a hole in the street and put a cover on it. You realize if you make it a big fucking square then the union needs to assign another guy to job to help you with the damn thing and your buddy gets on the $20/hour city job gravy train.

    41. Re:Why do interviewers use "riddles"? by jeremyp · · Score: 2

      The indentation style is the one advocated by Steve McConnell in Code Complete.

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    42. Re:Why do interviewers use "riddles"? by Elminst · · Score: 1

      No.
      It's called port information is in about a million places which are readily accessible by 100 different methods in under 15 seconds. Why bother to remember them?

      Save your memory for more important things.

      God damn you're elitest.

      --
      No unauthorized use. Trespassers will be shot. Survivors will be shot again.
    43. Re:Why do interviewers use "riddles"? by Anonymous Coward · · Score: 0

      Manhole covers are cast, not turned on a lathe or milled, so one shape is just about as easy as another one.

    44. Re:Why do interviewers use "riddles"? by jeremyp · · Score: 3, Informative

      In 1998 I was interviewed by the Technical Director of a small company in the UK. Their standard tech question was "write a function to rotate a monochrome bitmap". The idea was not to come up with necessarily the correct answer (as if there was *one* correct answer), but to see how you tackled the problem. The only problem with that particular question is that there was a danger that some otherwise perfectly adequate programmers would freeze like a rabbit caught in headlights.

      OTOH I've never seen a company with a higher concentration of good programming skills.

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    45. Re:Why do interviewers use "riddles"? by dillon_rinker · · Score: 2

      Why bother to remember them?
      It's not a bother. I've telnetted to mail servers maybe ten times in my short career. The first 4-5 times I had to look up the port number. The last few times I've done so I haven't.

      Save your memory for more important things.
      You can't save your memory. The brain remembers what it experiences frequently. I don't necessarily recommend that you review lists of port numbers thousands of times so that you can memorize them, but if you look up particular ports frequently, you WILL remember them.

      I stand by my statements; if you haven't looked up the SMTP and HTTP ports frequently enough to remember them, you haven't worked with them enough for me to hire you to work on such servers.

      you're elitest./I
      It's "elitist." And yes I am. It's not a bad thing; merely recognition that some people are better prepared for some tasks than other people are.

    46. Re:Why do interviewers use "riddles"? by Anonymous Coward · · Score: 0

      If that is your basis for hiring someone, your company must be doing worse than VA-Whatever-It-Is-Today.

    47. Re:Why do interviewers use "riddles"? by rsmah · · Score: 2, Insightful

      A couple of years ago I was asked: How many gas stations are there in the US? My answer: I don't know, I'd probably check a search engine. This is why this is a good interview question. It provides insight into whether the prospective candidate is willing to think about answers to questions with very little available or non-obvious information. I wouldn't hire you because you refuse to THINK. To "correct" answer is to use information that you know (i.e. population of the US) to come up with a "common sense" answer. For example: 200mil people in the US => about 100 mil cars @ $1 gas/car/day => $100 mil in sales/day => $30 bil sales/yr @ $1mil/station => 30,000 stations. Sanity check... that's 1 station for every 200,000/30 => 7,000 people...perhaps a bit too low. Fudge up to maybe 60,000 stations. This is probably correct to an order of magnitude. But that doesn't even really matter. The *point* of these questions is to guage whether or not the person can *think* or not. End of story.

    48. Re:Why do interviewers use "riddles"? by jweb · · Score: 1

      One of the many tidbits of knowledge from my parents:

      "The main difference between smart people and dumb people is that smart people will know where to look for answers to their questions, while dumb people will just make something up"

      Maybe it doesn't hold true in all cases, but I think it hits pretty close to the mark.

      --

      Think For Yourself. Question Authority.
    49. Re:Why do interviewers use "riddles"? by SerpentMage · · Score: 3, Informative

      Actually you do not need the man pages. Correct me if I am wrong here... BUT...

      char *s; get(s); put(s);

      Well s is not initialized and pointing at anything. Hence even if get allocated a buffer that value will not be carried back since it is a single pointer. For that to work you would need write get( &s) and then that would work.

      Yes?

      --

      "You can't make a race horse of a pig"
      "No," said Samuel, "but you can make very fast pig"
    50. Re:Why do interviewers use "riddles"? by banking_intern · · Score: 1

      The manhole cover is a circle because any other shape would have a way for the cover to fall through the hole.

    51. Re:Why do interviewers use "riddles"? by daoine · · Score: 4, Interesting
      My answer:I don't know, I'd probably check a search engine.

      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.

    52. Re:Why do interviewers use "riddles"? by Noofus · · Score: 1

      This is exactly why I wont work at MS. I walked out of an MS interview a few months ago because of this attitude.

      On my resume, I had listed (with URLs to more info/downloads) games I had written (in C/C++), Webpages I had built, database systems I had created using MySQL, XML/XSLT and Java.

      If that wasnt enough proof I could write code, then I dont know what is. Yet the interviewer asked me to write a "hello world" program on paper, in Java. This insulted me.

      The next thing he asked was a question on some kind of obscure java.net library that had to do with extracting an IP address as a dotted decimal string from random class. I told him "I dont know, but the answer is on java.sun.com and I could have it within 60 seconds". He said that was the wrong answer, he doesnt want people who need to "think" about looking up stuff, he wanted me to actually be able to vomit out obscure java APIs from memory. Sorry - my brain is occupied with useful things.

      He was wearing ripped jeans and a faded, ratty Windows 95 T-Shirt. Beat up sneakers and no socks. Never asked ME any questions - he constantly talked to my resume, as if it was going to answer..and chewed his fingertips as I answered.

      About 20 minutes in (I was scheduled for 45 minutes), I announced that there were probably better people suited to this job (code monkey?) and walked out. I now work at Lockheed Martin as a software engineer... NOT a code monkey like I would have been at MS....

    53. Re:Why do interviewers use "riddles"? by muffel · · Score: 1
      After I insisted that I couldn't come up with an answer on my own, I was informed that they were looking for people who "think out of the box" and only people that hazarded a guess made it to level two interviews.
      The point here is not that you just wildly guess a number and say it, the point is that you actually show your ability to think and deduct.

      You might for example start of with the number of inhabitants, guess how many cars/person, how many fillups/week/car, how many cars/station/day. Then do the math and come with an educated guess. And you will be surprised that your guess wasn't so bad after all.

      They don't care if you know Google. Any idiot can look the number up.

      --

      bla
    54. Re:Why do interviewers use "riddles"? by sql*kitten · · Score: 3, Insightful

      In other words, either "I'm too stupid to remember stuff I've looked up fifty times" or "I'm so inexperienced that I haven't looked those up very much." If you don't KNOW that SMTP is 25 and HTTP is 80, I don't want you working on my mail or web servers.

      Without looking it up, tell me the ports for all the kerberos daemons. Or x400.

      You forget - or perhaps are too inexperienced yourself to realize - that there is a lot more to the IT industry than the web or even the internet. Someone could be a highly skilled Unix administrator, and have never run a web server in a production setting. For example, how many public web servers are there running on Dynix? Not many I'd wager, but that particular Unix is common in transaction processing. Have you even heard of Dynix? Memorizing lists of ports is the hallmark of a wannabe.

    55. Re:Why do interviewers use "riddles"? by NFNNMIDATA · · Score: 1

      The Straight Dope tackled this question:
      http://www.straightdope.com/classics/a1_247a.html

    56. Re:Why do interviewers use "riddles"? by VikingBerserker · · Score: 1

      Actually, you're wrong about triangular manholes. As long as it's an equilateral triangle, the lid won't slip through the manhole. Therefore, it's a valid shape for manhole covers.

      However, you're right about the weight factor, which is why they're often round.

      Incidentally, I have seen a few triangular manhole covers, mostly around Nashua, New Hampshire. They seem to be used as access holes for electrical lines, and are less than a foot on a side. No need to roll something that small.

    57. Re:Why do interviewers use "riddles"? by pongo000 · · Score: 4, Interesting

      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.

    58. Re:Why do interviewers use "riddles"? by univgeek · · Score: 1

      Equilateral triangles WILL fall through. The height of the triangle is less than the side. Hence you just need to tip it in....

      --
      All bow to his Noodliness!! His Noodle Appendage has touched me!
    59. Re:Why do interviewers use "riddles"? by Anonymous Coward · · Score: 0

      The old Wankel rotary engine

      Can I just mention that I find this phrase hugely amusing as, I am sure, do many other Brits with a juvenile sense of humour.

    60. Re:Why do interviewers use "riddles"? by Ella+the+Cat · · Score: 1

      Drill down this site via "Join Us" and "interview preparation" and you'll see such questions and an explanation of why they are asked. I get the impression that it would be _very_ $worth$ doing for some people ...

    61. Re:Why do interviewers use "riddles"? by Anonymous Coward · · Score: 0

      Blew this one on an interview, huh?

    62. Re:Why do interviewers use "riddles"? by Anonymous Coward · · Score: 0

      Actually... The problem is that since s is not initialized, you get a seg fault. It's that simple. Having a man page of gets(3) would not give you any edge here.

    63. Re:Why do interviewers use "riddles"? by markov_chain · · Score: 1

      That's a good one. However, DHCP? That's a bit independent of making random TCP connections. And, speaking of TCP, let's throw in all the wonderful TCP flow control stuff, like slow-start, congestion avoidance, timeouts, etc. *8)

      --
      Tsunami -- You can't bring a good wave down!
    64. Re:Why do interviewers use "riddles"? by ChaosDiscordSimple · · Score: 3, Informative

      A couple of years ago I was asked: How many gas stations are there in the US?

      My answer: I don't know, I'd probably check a search engine.

      After I insisted that I couldn't come up with an answer on my own, I was informed that they were looking for people who "think out of the box" and only people that hazarded a guess made it to level two interviews.

      It sounds like the interviewer remembered a typical "impossible" question, but forgot why you ask it. The purpose isn't to think out of the box, the purpose is to examine problem solving skills with a problem the applicant has never seen before. Sure, you don't know anything about gas station density in the US, but you'll eventually be required to answer a question you don't really know anything about. "We've been asked to implement a simple web browser that will run on an embedded system that doesn't exist yet. Give me an estimate for how long it will take." It sucks, but you're going to need to do it.

      Because most engineers are loathe to pull estimates out of thin air, it's only fair to explain that you're only looking for a very rough estimate. If the engineer continues to resist, explain that you know he doesn't have good input to work with.

      That said, your answer, "check a search engine" isn't that bad of a place to start. (That's what reference materials are for!). When you're told that it's a good place to start, but that it's not an option, start making up numbers and guessing. Make it clear when you're guessing at numbers. "Well, there are about 300 million people in the US, about half don't have cards, so 150 million cars. You typically get gas once per week. A gas station can serve 100 people per day. That's 700 people per week, or about 1,000 for ease of doing the calculation. So you'll need about 150,000 gas stations." I promise that I pulled that answer out of the air. I have no idea how many people are in the US, let alone any of the other numbers, but I'm pretty sure that I'm within an order of magnitude. In fact, quickly searching the web it looks like I'm very close.

      Similar logic can get you surprisingly accurate numbers for the volume of water that flows out of the Mississippi each minute, the number of malls, police stations, high schools in the US, or other seemingly hard to know things. Just take what you do know and make educated guesses.

      The string hash function was just stupid, although it might have helped to ask the interviewer what properties he wanted out of the hash. In general, bouncing questions about the problem off the interviewer looks good and can often make the solution easy. The question does sound like an esoteric knowledge question, and those are the worst.

      Being asked to solve a tricky technical question? Well, it's a legit, real problem. It's a fair way to gauge your problem solving ability (did you stumble across the same things they did? Good. Did you suggest something new? Great.). I wouldn't worry about their "stealing" your answer. If the problem really is hard, it's unlikely in the ten or twenty minute interview question that you'll find a superior answer to them.

    65. Re:Why do interviewers use "riddles"? by VikingBerserker · · Score: 1

      Yeah, you're right. I was apparently entranced by the triangular manholes I've seen, which clouded my reasoning skills.

      I suppose I could clarify my statement by saying that it's still valid if the lip on the manhole is sufficiently wide, but that would also validate any other manhole shape. I wonder why Nashua chose triangles for its smaller access holes, then?

    66. Re:Why do interviewers use "riddles"? by UncleFluffy · · Score: 2

      It's possible to spot the mistake without knowing the semantics of gets()- knowing the rules of the base language is enough.

      Hmm, I see you work for Sendmail ... ;-)

      --

      What would Lemmy do?

    67. Re:Why do interviewers use "riddles"? by Anonymous Coward · · Score: 0

      > Another possible answer is that it makes it
      > easier to roll a heavy cover out of the way.
      > Again, one of the other curves of constant width
      > would do just about as well.

      No, the wankel engine shape will not roll like a circle. To roll, a curve must have constant RADIUS.

    68. Re:Why do interviewers use "riddles"? by Clarencex · · Score: 1

      30 seconds on google. In 1998 there were 187,097
      gas stations in the U.S.

    69. Re:Why do interviewers use "riddles"? by cwikla · · Score: 2, Insightful

      I take the exact opposite view. With no information available I see it as Garbage in, Garbage out. If you were working for me, I'd rather you admitted ignorance (not stupidity) to the problem at hand, and the answer, "I don't know, let me go research it", is a much more "correct" answer to me.

      Too bad you wouldn't hire me... It would be fun just making stuff up all day!

    70. Re:Why do interviewers use "riddles"? by Stinking+Pig · · Score: 1

      No, I've been looking for pre-sales engineers to work with networking products, security products, and managed hosting (three different companies). If I was hiring admins or developers, I'd be less interested in their knowledge of details because they'd have an opportunity to learn on the job. When you're an SE, you don't get many chances to learn on the job -- you have to know the details because you're going to discuss them at a white board or a conference table, not at a keyboard where the answers are only a few seconds away.

      --
      "Nothing was broken, and it's been fixed." -- Jon Carroll
    71. Re:Why do interviewers use "riddles"? by One+Louder · · Score: 1

      Nope - There are other convex shapes that won't fall through. Here's how to make one:

      1) Draw an equilateral triangle.
      2) Draw a circular arc with the center on one corner, with the arc between the other two corners
      3) Repeat for the other two corners.

      You now have a triangle shape with circular arcs as the edges. This won't fall through a hole the same shape. It works for any regular convex polygon with an odd number of sides.

    72. Re:Why do interviewers use "riddles"? by Stinking+Pig · · Score: 1

      No, I don't think that some silly-ass riddles will separate the wheat from the chaff. But I don't have three months to interview someone, I have three hours spread across two days, and in many cases it's been all over the phone. If I was interviewing ATCs I'd demand three months, but I've been interviewing SEs instead. When I'm interviewing, I'm looking to weed out junior salesweasels who want to have a higher base. The perfect fit for this job is a senior admin or architect who is tired of being on call.

      --
      "Nothing was broken, and it's been fixed." -- Jon Carroll
    73. Re:Why do interviewers use "riddles"? by t · · Score: 2
      It depends on how it is phrased. I would ask one of two questions

      1) Estimate how many gas stations there are in the US.
      2) How many gas stations are there in the US?

      Note the importance of wording. Your answer is clearly wrong for question (2). For question (1) I would expect your type of answer but for question (2) I would expect an answer such as, going to the proper government agency that gives licenses to sell gas and ask them how many active licenses there are. That would be as exact an answer you could get.

      t.

    74. Re:Why do interviewers use "riddles"? by Fulcrum+of+Evil · · Score: 2

      Being asked to solve a tricky technical question? Well, it's a legit, real problem. It's a fair way to gauge your problem solving ability (did you stumble across the same things they did? Good. Did you suggest something new? Great.). I wouldn't worry about their "stealing" your answer. If the problem really is hard, it's unlikely in the ten or twenty minute interview question that you'll find a superior answer to them.

      Well, I have heard of a number of times where companies go on an interview, get the tough problem and solve it, only to find out later that all they really wanted was the answer to the problem.

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
    75. Re:Why do interviewers use "riddles"? by cwikla · · Score: 1

      Ah, but I would claim that the scheduling problem and the number of gas stations is completely different.

      When you ask "how long will this take", you are asking that person because they have some experience, somehow, in what you are asking them. It's not a baseless question.

      I would equate the gas station question to asking an engineer "how long will it take to design and build an office building", or an architect "how long will it take to write a web server?". Both could be really smart people and efficient thinkers, but I would hazard neither has the knowledge or background to make a guess, and should realize this. Sometimes (alot of times) the correct answer is "I don't know". And I think an even better answer is, "I don't know, let me go find out."

    76. Re:Why do interviewers use "riddles"? by t · · Score: 2
      The question is silly. First of all, if there was no hole there would be no need for a cover. Thus the hole must have come first. How do you make a hole like that? Usually with a large drill. Drills make circular holes. Pipes to put into the holes are also circular because they don't crush very easily, e.g., a square shape would need a triangle support member to make it incompressible. Thus when faced with a hole in the ground that is circular, you put a circular cover on it. The remaining qualites such as not being able to fall into the hole are free extras.

      t.

    77. Re:Why do interviewers use "riddles"? by cwikla · · Score: 1

      Actually it might not segfault. It's just pointing to some random place, quite possibly in your own process, maybe in some unused area. If you enter a byte or two, you might be able to get away with it (sort of) working.

      If you initialized the pointer to 0, then yep, it will segfault.

    78. Re:Why do interviewers use "riddles"? by Anonymous Coward · · Score: 0

      The Gas Station question is a common question used in a lot of interviews, even outside of the technical industry. I made the mistake of trying to futz this one by saying I'd have to look it up too. That is the wrong answer. After thinking about this for a while, the answer is glaringly simple. A real forehead slapper.

      It's a critical thinking question, not a literal question.

      The answer you ask? There are just enough gas stations in the US. If there were too many, they'd be going out of business, if there weren't enough, they'd be building more.

    79. Re:Why do interviewers use "riddles"? by parad0x01 · · Score: 1

      server-side processors

      Holy smokes, they have processors on the server side now, what will they think of next?

      --

      This .sig has been censored for your protection
    80. Re:Why do interviewers use "riddles"? by Anonymous Coward · · Score: 0

      I dont think any gas station owner does these kind of calculation before opening a gas station!! I hate when people do these stupid assumptions.

    81. Re:Why do interviewers use "riddles"? by richieb · · Score: 2
      Just like the question: "How many turns are there on all the roads in the US?" Answer: "Two, left and right".....

      --
      ...richie - It is a good day to code.
    82. Re:Why do interviewers use "riddles"? by HeyLaughingBoy · · Score: 1
      After I insisted that I couldn't come up with an answer on my own, I was informed that they were looking for people who "think out of the box" and only people that hazarded a guess made it to level two interviews.

      It sounds like the interviewer remembered a typical "impossible" question, but forgot why you ask it. The purpose isn't to think out of the box, the purpose is to examine problem solving skills with a problem the applicant has never seen before. Sure, you don't know anything about gas station density in the US, but you'll eventually be required to answer a question you don't really know anything about. "We've been asked to implement a simple web browser that will run on an embedded system that doesn't exist yet. Give me an estimate for how long it will take." It sucks, but you're going to need to do it.

      You know, I agree with the original guy. So you make an estimate, you still have no idea how good the estimate is, so what do you do with it? How much credence do you assign to it? If you need to know, look it up. If you can't look it up, then at least be sure that the assumptions you base the estimate on are valid. I would never try to estimate the # of gas stations in the US, simply because I don't have good starting data to make the estimate with.
      Look at your webserver "problem." If you don't know anything about the embedded system, then any estimate you make is equally useless. e.g., if it turns out that the system is based on a Pentium II running Windows CE, the development time for the browser is approximately zero as you can probably use Explorer; if it's based on a Motorola 68HC05J1, then I'll be impressed if you can make *any* browser fit into that 2kbyte CPU.

      It's a dumb question!
    83. Re:Why do interviewers use "riddles"? by dillon_rinker · · Score: 2

      Without looking it up, tell me the ports for all the kerberos daemons. Or x400.

      I can't tell you any of them. (I didn't even know that X.400 had well-defined TCP/IP ports.)

      My stance is that my ignorance suggests either stupidity (I've looked 'em up a thousand times but I'm too dumb to remember) or inexperience (um...isn't Kerberos the dog who guards Hades? What does that have to do with computers?)

      If you disagree with my stance, then you believe that my ignorance of Kerberos and X.400 ports tells you ZERO about my ability or experience with these products.

      there is a lot more to the IT industry than the web or even the internet
      True. I picked a couple of examples. That's all they were. I stand by my statement - I would never hire someone to admin a mail server who didn't know the SMTP port; I would never hire someone to admin a web server who didn't know the HTTP port.

      Memorizing lists of ports is the hallmark of a wannabe.
      Absolute agreement. Knowledge is not a predictor of success and doesn't necessarily suggest experience (did I mention that I passed several McTests for Windows NT without ever having even seen it?). That was not my point. My point was that ignorance is a predictor of failure.

      Tell me why you disagree.

    84. Re:Why do interviewers use "riddles"? by Anonymous Coward · · Score: 0

      No offence but... you've telnetted to mail servers about ten times in your career, and you're in the position of hiring people? Eek. I've only just graduated, and even I've done so maybe 100 times or more.

      And you'd hire someone to work for you based on knowledge which you yourself only obtained recently? Even more scary.

    85. Re:Why do interviewers use "riddles"? by Cramer · · Score: 1

      "char *s" means s is a "pointer to char"

      "( &s )" means the "address of s"

      The address of "s" doesn't really amount to much in a sane world. (There are rare, strange situtations where knowing the memory locations of storage is important, but that's not important here.) You don't want gets() changing the storage location of "s"; you want it to change the value of the pointer itself which is the value at the address of "s". In actuality, the function places data at the memory location pointed to by the value of "s".

    86. Re:Why do interviewers use "riddles"? by KewlPC · · Score: 1

      Actually, knowing the address of a variable can be useful.

      "char *s" means s is a "pointer to char"

      "( &s )" means the "address of s"


      Actually, a pointer points to an address in memory. If you're passing a non-pointer variable to a function that expects a pointer, you'll have to use "&" to get the address of the non-pointer variable, since passing a pointer is the equivalent of passing an address in memory.

    87. Re:Why do interviewers use "riddles"? by consoneo · · Score: 1

      Alright. Manhole covers were DESIGNED round so they would not fall through the holes. That was the plan in mind when they were made round. All of that BS you just posted totally circumvented the actual purpose of the design.

      Flat out, plain and simple. The reason manhole covers are round is this. The people who designed the manhole covers wanted to make them so the workers would not get injured or drop them in the holes while lifting them. They desinged them to not fall in the hole.

      The manhole covers you're talking about are not manhole covers. They're sewer grates and the like.

    88. Re:Why do interviewers use "riddles"? by chrisos · · Score: 1

      Surely you use round covers, because it is impossible to drop the cover down the hole?

      The cover is bigger than the hole, no matter what angle you throw the cover at the hole...

      Or am I missing something? :D

      --
      If nature abhors a vacuum, why isn't there more dust in the world?
    89. Re:Why do interviewers use "riddles"? by JacobO · · Score: 1

      And is a nice OS too.
      Pity it's so low on everyone's port list.
      Clearly, all people want to do is illicit some sign that this person being interviewed is going to add some skill or experience to the team. Mostly interviewers are worse at asking questions than the interviewees are at answering them. Some get off on the power it gives them too, in a lot of organisations, you can't blame them. There are very few "dumb" people out there on either side of this fence, they just need the right guidance to bring out their abilities.

    90. Re:Why do interviewers use "riddles"? by (outer-limits) · · Score: 2

      Sounds like you are rejecting all the best salesmen to me. Thats how they all act.

      --

      Microsoft - Where would you like to go today, Maybe Jail?

    91. Re:Why do interviewers use "riddles"? by SerpentMage · · Score: 2

      Lets go through the source again

      char *s;
      get(s);
      put(s);

      In the case as shown if get copies data to s then it will crash, because s is not initialized and points to nothing legit.

      If however get has an internal buffer that it allocates (like some routines do) then that is not the correct syntax because s is not a pointer to a pointer. For that to work then you would have to use the notation get( &s).

      But in either case the program is wrong and you do not need to know about the implementation of get at all and you do not need to care how get works.

      --

      "You can't make a race horse of a pig"
      "No," said Samuel, "but you can make very fast pig"
    92. Re:Why do interviewers use "riddles"? by h4x0r-3l337 · · Score: 2

      Sorry, but you're the one who is wrong. An equilateral triangle with sides of length A will have a height (from one of the tips to the opposing side) of sqrt(3/4)A, which is about .87*A. Therefore you can easily slide the cover through the hole by holding it so one of the sides is vertical and then lowering it near the edge of the hole.
      Obviously you can get around this problem by making the cover about 13% bigger than the hole, but you wouldn't need to do this (as much) for a circle.

    93. Re:Why do interviewers use "riddles"? by dillon_rinker · · Score: 2

      Silly coward...you've been speaking English for how many years and you've never heard of the subjunctive? I'm in no position to hire anyone.

    94. Re:Why do interviewers use "riddles"? by skotte · · Score: 2

      this seems awfully complicated. and you're right. it's WAY too low. try tripling that number.

      actually, i would look at this way:

      we know and can assume most major intersections have 2 gas stations. (some have 4, some have none, and some stations arent even at any corner. but we are talking averages. so we will allow 2 per major intersection.) so we simply have to fFind the number of major intersections and double that. the trick becomes simply defining what is a major intersection. just do the hard part, and conduct bit of a quick land survey (it's probably easier than you might think it would be). pull out a map, and count the number of small towns in a given area, say in a 10 county area, multiply that by the number of counties in the state (most average states have around 100 counties) use sample counties which should include at least one sizable twon, and several outlying towns. dont worry too much about vacuous counties like in the midwest. just redo a new sample area. you'll probably fFind larger states like nevada also have larger counties, which give them just as much stuff in each county.

      i'm not sure what the answer would be honestly. i'll work it up. but you see where i'm going.

      and as you say, the point is not getting a right answer: it's getting ANY answer.

  5. These are pretty easy by SlugLord · · Score: 3, Interesting

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

    1. Re:These are pretty easy by RadioheadKid · · Score: 5, Funny

      My first thought was, where are the answers. My second thought was, thank god I have a job.

      --
      "Karma can only be portioned out by the cosmos." -Homer Simpson
    2. Re:These are pretty easy by Anonymous Coward · · Score: 0

      Where are the answers?

    3. Re:These are pretty easy by Com2Kid · · Score: 1
      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?


      I can /never/ do these puzzles, but on the flip side I have a blast with those logic diagraming style thingies, you know where you have those boxs and you have to figure out who did what (nice part is when they start expanding into huge ol' things, hehe, they get really fun after a certian size. :-D )

      but shit, It'd take me forever to figure out how to slice a cake 3 times and get 8 pieces, and, err, who knows the answer to this one?
      • A man would like to have safe sex with three women, any of whom may be carrying an STD. Given two condoms, how can he do so, while ensuring that no STD is passed from one woman (or possibly himself) to another (or to himself)?
    4. Re:These are pretty easy by Anonymous Coward · · Score: 0

      Force the dumb sluts to suck your dick

    5. Re:These are pretty easy by Blackneto · · Score: 0

      cut the cake horizontal, then quarter it.

      --
      Ursula Andress, Catherine Deneuve, and Charo, twice...
    6. Re:These are pretty easy by ROBOKATZ · · Score: 1
      1. Put on both condoms
      2. Have sex
      3. Take one off
      4. Have sex again
      5. Put the one you took off, back on, only inside out
      6. Have sex again

      Of course, this is totally stupid.

    7. Re:These are pretty easy by stuffman64 · · Score: 2

      cake slice:

      one cut on x axis (in half)
      one cut on y axis (in half again)
      one cut on z axis (instead of cutting down into the cake, cut horizontally through it)

      remember, you need to double the number of slices with each cut (2^3=8). Try to think of cutting it on all sides, not just the top

      --
      --- At my sig, unleash hell.
    8. Re:These are pretty easy by Anonymous Coward · · Score: 0

      You can also cut, stack, cut, stack, cut

      Both are correct

    9. Re:These are pretty easy by Com2Kid · · Score: 1

      Put on both condoms
      Have sex
      Take one off
      Have sex again
      Put the one you took off, back on, only inside out
      Have sex again
      Of course, this is totally stupid.


      Yah, you could still potentialy get an STD that way, thus problem is not solved. :P

    10. Re:These are pretty easy by Com2Kid · · Score: 1

      Oh no wait, I did not see the put both on part. *sighs* See, I told you I am not good at these things, even reading it my mind refused to pick up the out of the ordinary. :(

    11. Re:These are pretty easy by duras · · Score: 1

      one cut
      stack the two identical segments
      one more cut
      stack the four identical segments
      one more cut

      share and enjoy

    12. Re:These are pretty easy by WilliamWu · · Score: 1

      Frankly, I don't believe you, unless you're some uber-genius. I've stumped CS professors here with these riddles.

      --
      William Wu http://www.ocf.berkeley.edu/~wwu
    13. Re:These are pretty easy by WilliamWu · · Score: 2, Informative

      hi! thanks for checking out the site. i decided to not post answers because i figured it would take the joy out of doing these riddles; part of that joy is banging on blackboards and repeating to yourself that things are impossible and pulling your hair out. this torture then makes the solution all the more joyful :) if i made the solutions available, i think most people would be tempted to click on the answers after just a few minutes of thought at most, and that would kinda ruin the learning experience.

      --
      William Wu http://www.ocf.berkeley.edu/~wwu
    14. Re:These are pretty easy by Anonymous Coward · · Score: 0

      I'm not good at these puzzles either.

      My immediate thought was, hmm but research strongly suggests that I can still get incurable stds like genital herpes even if I use a condom.

      And then my mind started to wander...

    15. Re:These are pretty easy by SlugLord · · Score: 1

      Well I said I sampled them. I have taken a longer look and some of them are hard and some appear time-consuming, but I don't see that any of them are impossible. I solved a few and posted them... The fork in the road I is quite simple, and that is listed in the "truly sexy" section.

    16. Re:These are pretty easy by kuiken · · Score: 1

      Thats why i hate these things, I dont doubt your answer is the "correct one" but it is so flawed, the solution can not be safely used in real life.
      So my answer was "run to the 7/11 and buy some more.

      Never got the hang of these type of questions, have some old school grades to prove it :)

      --

      42
    17. Re:These are pretty easy by Anonymous Coward · · Score: 0

      Well, you're wrong. If you don't post answers, most people won't even try to solve the problems because if they don't succeed they will have learned nothing and their time will have been wasted.

    18. Re:These are pretty easy by Anonymous Coward · · Score: 0

      What the hell do you care how long we spend figuring out the answers? We're going to find it anyhow, given your help or not, so stop being an ass and post the answers. :P

    19. Re:These are pretty easy by Anonymous Coward · · Score: 0

      ok, so how long after you figured them out did you figure out that after a minute you'd figured them out wrong?

    20. Re:These are pretty easy by Anonymous Coward · · Score: 1, Funny

      You're right, these are easy. Take this one:

      You are in an empty room and you have a cup of water. The cup is a right cylinder, and it looks like it's half full, but you're not sure. How can you figure out whether the cup is half full, more than half full, or less than half full? You have no rulers or writing utensils.

      Obviously, you

      1. Grab the cup with your thumb at the water level.
      2. Pour the water into your mouth, but don't swallow.
      3. Whip out your dick and piss in the cup, up to the level of your thumb.
      4. Spit the water back into the cup.

      If the water + piss fills the cup exactly, the cup was half full. If it spills over, the cup was more than half full. If it comes up short, the cup was less than half full.

      Do I get the job?

    21. Re:These are pretty easy by Anonymous Coward · · Score: 0

      yeah!?

      and these CS professors didn't even come up with the obvious solution of 'they're all trivial, I can them all in less than a minute'?

      they should learn how to troll.

    22. Re:These are pretty easy by the+bluebrain · · Score: 1

      1. Grab the cup with your thumb at the water level.
      2. Pour the water into your mouth, but don't swallow.
      3. Whip out your dick and piss in the cup, up to the level of your thumb.
      4. Spit the water back into the cup.

      If the water + piss fills the cup exactly, the cup was half full. If it spills over, the cup was more than half full. If it comes up short, the cup was less than half full.


      Mmmmkay. Hafta have an answer that would be accepted by the archetypal anal-retentive Examinator in the thread somewhere tho ...

      Tip the cylinder until the water is almost starting to pour out, then check the level at the back. Compensate for surface tension (how? uh...).

      (OK. So that just made me the anal-retentive examinee.)

      --
      yes, we have no bananas
    23. Re:These are pretty easy by krugdm · · Score: 2
      Try to think of cutting it on all sides, not just the top

      Actually, you can do this with three cuts through the top. Make the first two cuts above, then make a circular cut through the top to give you eight pieces.

      This way, everyone gets frosting!

    24. Re:These are pretty easy by stephenbooth · · Score: 1

      It would be useful to have the 'official' correct answers available to check if you're on the right track. Tt's possible, probable even, that you could think of a perfectly reasonable solution that demonstrates good reasoning skills but which if you produced at interview the interviewer would reject you on the basis that it isn't the 'correct answer' written on the piece of paper in front of them, or there might be an "Ahhh, but.." clause.

      I only had a quick glance at the first two relatively easy riddles (the "Jars of Marbles" and the "Sheik's Race"). Here's what I think:

      Jars of Marbles

      First remove all of the white marbles from their jar. Then put half of the black marbles in the empty jar so you have two jars half full of black marbles. Carefully top up each jar with white marbles so the bottom half of each jar is black marbles and the top white. when picking be sure to take a marble from the top. The maximum probability of surviving is 1, i.e. certain.

      Sheik's Race

      The advice to each son was to ride the other's camel over the finish line as it was which camel crossed the line last (or first depending on your point of view) not which son.

      I'm fairly certain of the second one but suspect that it would result in an accusation of cheating.

      Stephen

      --
      "Don't write down to your readers, the only people less intelligent than you can't read" - Sign on Newspaper Office Wall
    25. Re:These are pretty easy by Anonymous Coward · · Score: 0

      Jars of Marbles

      First remove all of the white marbles from their jar. Then put half of the black marbles in the empty jar so you have two jars half full of black marbles. Carefully top up each jar with white marbles so the bottom half of each jar is black marbles and the top white. when picking be sure to take a marble from the top. The maximum probability of surviving is 1, i.e. certain.


      I was under the impression that there would be no information on where the marbles were in each jar - i.e. you could say "32 white and 17 black in A, 18 white and 33 black in B" but the selection would have to be random.
      Given those, the thing that came to mind was put 1 white in jar A, and 49 white and 50 black in jar B. Then if you get given jar A, you are fine; if given jar B you get near enough to a 50% chance. Overall about 75% chance of survival.

      Sheik's Race

      I beleive your solution is usually the 'correct' one. I also thought of him making them agree to swap the inheritance, or if he told them that the sheik was broke and they'd inherit his debts, or indeed if he threatened to shoot whoever got there last so the other brother would get the inheritance anyway :)

    26. Re:These are pretty easy by stephenbooth · · Score: 1

      From the page:

      there are two jars, one with 50 white marbles, and one with 50 black marbles.

      I took this to mean that one jar is filled with white marbles and the other with black

      Stephen

      --
      "Don't write down to your readers, the only people less intelligent than you can't read" - Sign on Newspaper Office Wall
    27. Re:These are pretty easy by ConsumedByTV · · Score: 2

      I have a few questions for you:

      Do you have access to your server logs for your area of the server?
      If so can you post some stats?
      What kind of bandwidth are you using up?

      Thanks for the neat questions :)

      --


      "Not my manner of thinking but the manner of thinking of others has been the source of my unhappiness." - M
    28. Re:These are pretty easy by Strike · · Score: 1

      Erm, I'm pretty sure this fails the "straight" cut requisite. But why restrict ourselves to Euclidean geometry?

    29. Re:These are pretty easy by WilliamWu · · Score: 1

      I should have specified that other people may shake up the marble jars before handing them to you, so layering them like that won't work.

      --
      William Wu http://www.ocf.berkeley.edu/~wwu
    30. Re:These are pretty easy by stephenbooth · · Score: 1

      In that case I'd have to go for the "Thankyou for the coffee, you're a bunch of fuckwits." response. At least it would prove that I'm not afraid to challenge managers when I think they're doing something really stupid.

      Or maybe the answer is to have a really long game of marbles whilst waiting for the mercs I hired to bust me out if such a situation arose to bust me out. I plan ahead, and lets face that's more likely than some country deciding on whether to execute foriegners based ont heir ability to pick the right color marble out fo a jar.

      Stephen

      --
      "Don't write down to your readers, the only people less intelligent than you can't read" - Sign on Newspaper Office Wall
    31. Re:These are pretty easy by MoTec · · Score: 1

      A couple of friends and I here at work have been discussing this and I think I have the best solution.

      For clarification: The jars are not stated as being full, just of having 50 marbles in them. Also, it says that a marble must be picked at random. I believe that that would preclude any layering.

      I can't make it any more sure than about 75% chance of living... That's a whole lot better than 50/50 or less.

      What I would do is take all but one white marble from the white jar and put 49 of 'em in with the black marbles. That way if I got the first jar, I'd have a 100% chance of getting a white marble and with the 2nd jar I'd have close to a 50/50 shot. I think that's the best solution.

    32. Re:These are pretty easy by Anonymous Coward · · Score: 0

      Yah, thats what I was thinking. Figured it was because its durring an interview and you may only have some short amount of time to solve it.

    33. Re:These are pretty easy by Anonymous Coward · · Score: 0

      OK so I'm a tool. I just looked at the first few and solved them and assumed they were all pretty easy. I admit I jumped the gun.

      -Sluglord

    34. Re:These are pretty easy by Anonymous Coward · · Score: 0

      unfortunately, only a few minutes after I had put my foot in my mouth, but thanks for asking

  6. Riddles... by Radi-0-head · · Score: 1
    "I believe Microsoft was responsible for popularizing the usage of riddles in interviews"

    Their software is also quite riddled... with bugs, anyway.

  7. Riddles by WickedClean · · Score: 1

    How much wood could a woodchuck chuck if a woodchuck could chuck wood?

    --
    ...All I can say is that my life is pretty strange...
    1. Re:Riddles by Anonymous Coward · · Score: 0

      Guybrush: How much wood could a woodchuck chuck if a woodchuck could chuck wood?

      Person: A woodchuck could chuck no amount of wood since a woodchuck can't chuck wood.

      Guybrush: But if a woodchuck could chuck and would chuck some amount of wood, what amount of wood would a woodchuck chuck?

      Person: Even if a woodchuck could chuck wood, and even if a woodchuck would chuck wood, should a woodchuck chuck wood?

      Guybrush: A woodchuck should chuck if a woodchuck could chuck wood, as long as a woodchuck would chuck wood.

      Person: Oh. Shut up.

    2. Re:Riddles by chaidawg · · Score: 2
      Since a woodchuck is actually a groundhog (or so I've been told):

      How much ground could a groundhog grind if a groundhog could grind ground?

    3. Re:Riddles by Anonymous Coward · · Score: 0

      He'd chuck as much wood as a woodchuck would, if a woodchuck would woodchuck wood!

    4. Re:Riddles by MrResistor · · Score: 2

      A woodchuck would chuck as much wood as he could chuck if a woodchuck could chuck wood.

      That's one of my dad's favorites.

      --
      Under capitalism man exploits man. Under communism it's the other way around.
    5. Re:Riddles by Anonymous Coward · · Score: 0

      ZOTTT!!!

      You owe the Usenet Oracle a urn in which to store your ashes.

    6. Re:Riddles by Anonymous Coward · · Score: 0

      Oh, just steal his damn hammer and be done with it...

    7. Re:Riddles by Anonymous Coward · · Score: 0
      WickedClean:
      How much wood could a woodchuck chuck if a woodchuck could chuck wood?

      ZOT

    8. Re:Riddles by GMontag451 · · Score: 2
      How many mitts could a nitwit knit if a nitwit could knit mitts?

      Damn, that one is even hard to type!

    9. Re:Riddles by UnknownSoldier · · Score: 2

      > How much wood could a woodchuck chuck if a woodchuck could chuck wood?

      9 cords.

      (Apologies to Monkey Island 2 :-)

    10. Re:Riddles by Anonymous Coward · · Score: 0
      But a woodchuck can't chuck wood...

      But if a woodchuck could chuck wood, and a woodchuck would chuck wood, how much wood would a woodchuck chuck?

    11. Re:Riddles by Anonymous Coward · · Score: 0

      a wood chuck will chuck as much wood as it wants to chuck. its all dependent on how much energy the wood chuck has, how much wood is availiable for him to chuck and how much he actually wants to chuck it ..

  8. Is God so big that he can make a rock so big by multiplexo · · Score: 1

    that even he can't lift it? Oh wait, that was for my interview for entry into the Comparative Religion department, not Computer Science.

    --
    cheap labor conservatives - they want to keep you hungry enough to be thankful for minimum wage.
    1. Re:Is God so big that he can make a rock so big by Anonymous Coward · · Score: 2, Funny

      Could Jesus Microwave a Burrito so HOT That Even HE Couldn't eat it?

    2. Re:Is God so big that he can make a rock so big by Anonymous Coward · · Score: 0

      The answer: There is no such rock even in a theoretical plane. It's simply a logical contridiction.

      You're basically asking to create a rock which is both completely white and completely not white at the same time. AKA meaninglessness.

    3. Re:Is God so big that he can make a rock so big by reverseengineer · · Score: 1

      So what you're saying is, an "omnipotent" Supreme Being does not possess the power to defy a paradox? God does not possess the ability to accomplish things beyond the human scope of reason and logic? How can a being be truly omnipotent if its powers are bounded by logical statements? How powerful is an all-powerful god that can create an entire universe but cannot make a rock both completely white and nonwhite at the same time? Your reasoning simply backs out of a paradox only to step into another paradox.

      --
      "FDA staff reviewers expressed concern about the number of patients who were left out of the study because they died."
  9. The date is the riddle. by sapped · · Score: 1

    How could they have put all the comments on the page if it says;
    Page last modified January 1, 1970 GMT

    1. Re:The date is the riddle. by Quantum+Singularity · · Score: 1

      Faulty javascript. Very, very faulty javascript. I don't see how someone could mess up the document.lastModified object so badly. Of course, maybe it's just your browser.

    2. Re:The date is the riddle. by Max+the+Merciless · · Score: 1

      "Page last modified January 1, 1970 GMT"

      does have a certain coolness to it...

      --
      * * Always question "the National Interest" - 9 times out of 10 it is a cover for evil
    3. Re:The date is the riddle. by Derleth · · Score: 2, Informative

      January 1, 1970 0000 GMT is the standard *nix epoch, so the clock must have been set to zero at the time it spat up that little gem.

      --
      How can you use my intestines as a gift? -Actual Hong Kong subtitle.
    4. Re:The date is the riddle. by Gordonjcp · · Score: 2
      Or the function that prints the time was fed 0. If you did something like:

      $time_now = unixtime(); // gives time in seconds from Unix epoch
      // code
      print "Last Modified: "+texttime($timenow); // Prints time as DDMMYY hh:mm but notice there's no underscore

      then the second function would be passed an unset variable, which would be zero. That would give you 0000GMT, 1/1/1970.

    5. Re:The date is the riddle. by WilliamWu · · Score: 1

      Sorry; document.lastModified worked fine on .html files, but not on .shtml. I'm using an echo command now and it's fixed; thanks.

      --
      William Wu http://www.ocf.berkeley.edu/~wwu
  10. Microsoft wasn't responsible dumbass by Anonymous Coward · · Score: 0

    You were likely running Mozilla or some other GPL bullshit like Audacity. Or maybe you can't keep your registry or swapfile from being corrupted. Go suck Linus Torvalds dick while Steve Jobs ass pounds you.

    1. Re:Microsoft wasn't responsible dumbass by Hektor_Troy · · Score: 1

      Well, you'd have to get out of the way first ...

      --
      We do not live in the 21st century. We live in the 20 second century.
    2. Re:Microsoft wasn't responsible dumbass by Anonymous Coward · · Score: 1, Insightful

      I've seen a windows system, fresh off of install (nothing added in, all drivers detected by windows), with no hardware problems, crash in under 20 minutes.

      the same system ran Linux for a month without rebooting.

      I didn't think anything of it at the time. I should have video taped it..........

  11. One of my favorites by Reality+Master+101 · · Score: 5, Interesting

    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.
    1. Re:One of my favorites by Anonymous Coward · · Score: 0
      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######".
      OK, I'll byte. Would you not simply check for this by having the parser make two passes? i.e. when the parser began execution, it would look for any existing variables named VAR###### and rename them to TMP###### and then properly rename them during the second pass.

      (If this isn't the right answer, I'd like to know what you would consider to be the correct answer.)
    2. Re:One of my favorites by Horizon_99 · · Score: 2, Insightful

      Doesn't matter, the variable will be renamed along with the others.

      Now I get a gold star right? ;)

    3. Re:One of my favorites by gmack · · Score: 3, Insightful

      Is the answer .. nothing?

      You shouldn't have to special case that since it's just another variable name.

    4. Re:One of my favorites by Reality+Master+101 · · Score: 1

      BZZZZT. Try again and think it through this time... if you still don't get it, I'll give you the answer and you can begin kicking yourself.

      --
      Sometimes it's best to just let stupid people be stupid.
    5. Re:One of my favorites by Reality+Master+101 · · Score: 1

      Ah well, someone already posted the answer. You may start kicking yourself now. :)

      Don't worry about it, though... it's an easy trap to fall into, and I've caught some really bright people with it.

      --
      Sometimes it's best to just let stupid people be stupid.
    6. Re:One of my favorites by Reality+Master+101 · · Score: 4, Interesting

      You the man! Here is your honorary degree.

      Now, for this honorary Ph.D., answer this question (another one of my favorites):

      You have a 32 bit unsigned integer. You want it to be really reliable, so you store it three times (triple redundancy). Write a subroutine that takes three unsigned, 32 bit integer arguments, and returns a single unsigned 32 bit integer that is constructed by having the bit in each bit-position "vote" for the corresponding output bit (e.g. if at least two of the low-order bits in the passed in arguments are 1, then the low-order bit in the output is a 1).

      Hint: There's an easy, fast way, and there's a hard, slow way. I'm looking for the easy, fast way.

      I actually got this question on an interview once (and of course figured out the right answer :) ).

      --
      Sometimes it's best to just let stupid people be stupid.
    7. Re:One of my favorites by Anonymous Coward · · Score: 1, Informative

      Here's the answer that immediately popped into mind for me...I'm too lazy to make sure that it actually works :)

      unsigned triple_protect(unsigned a, unsigned b, unsigned c)
      {
      unsigned tmp1, tmp2, tmp3;

      tmp1 = a & b;
      tmp2 = b & c;
      tmp3 = a & c;
      return (tmp1 | tmp2 | tmp3);
      }

    8. Re:One of my favorites by baywulf · · Score: 1

      You could build a truth table for the majority function, get the minterms and write an equation using bitwise operations.

    9. Re:One of my favorites by Reality+Master+101 · · Score: 2

      Close, but I have to mark you down for assuming that "unsigned" is 32 bits... it's only guaranteed to be at least 16 bits. :)

      Of course, I also prefer the more l33t version...

      return ((a & b) | (b & c) | (a & c));

      --
      Sometimes it's best to just let stupid people be stupid.
    10. Re:One of my favorites by Stmyer · · Score: 1

      Differential equations anyone?

      The Matrix has you!

    11. Re:One of my favorites by flonker · · Score: 2

      That seems simple enough.

      (A & B) | (B & C) | (A & C)

      If any two agree that the bit is 1, then it gets ORed in.

    12. Re:One of my favorites by Anonymous Coward · · Score: 0
      If the correct answer is "do nothing," I'm not kicking myself yet. I think I'd have to contest either the wording of the question or the correctness of the "do nothing" answer. Looking back at the original question:
      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######".
      Let's say the existing variable is named VAR000005. My parser fires up and starts replacing variable names throughout the program. Suppose I've already replaced 9 variables when I encounter VAR000005 (which already existed). I'm going to ignore it because as far as the parser knows, it's already been replaced.

      If each variable name only occurs once within the program, then "do nothing" is the obvious answer.. But the question didn't specify such. I'm assuming the parser is supposed to be smart enough so that it replaces all occurrences of each variable name within the program.
    13. Re:One of my favorites by Shabazz · · Score: 1

      First number = A, Second = B, Third = C.

      D = A XOR B.
      E = D XOR C.
      Answer = Complement of E.

    14. Re:One of my favorites by gmack · · Score: 2

      Damn this is so much more fun than the "lets do this the stupid way so when we show you the next function you will see how much it's needed" classes I had. I mught have bothered to continue :P Ohh well I was broke anyways.

      I see someone else got the second riddle)and that is pretty close to what I was thinking of)

    15. Re:One of my favorites by djohnsto · · Score: 2

      If the inputs are A, B, and C, then is:

      (A&B)|(B&C)|(A&C)

      the easy way or the hard way? It's only 5 instructions (well 9 if you count loading and storing to memory).

      --
      Dan
    16. Re:One of my favorites by Reality+Master+101 · · Score: 2

      It's simple enough for people who understand bits, but there are a LOT of people out there who don't understand bits and logical operators. Most people write a loop that does it one bit at a time.

      What I like about this question is that it tests whether someone understands bits without being a big "gotcha" question.

      OK, here's another one that I used to test someone's ability to think mathematically:

      Write a subroutine that given month, day and year, returns the day of the week.

      --
      Sometimes it's best to just let stupid people be stupid.
    17. Re:One of my favorites by Reality+Master+101 · · Score: 1

      I'm going to ignore it because as far as the parser knows, it's already been replaced.

      Why would you ignore it? This is a single-pass process with just a table of mappings of input variable names to output variable names. It doesn't matter if one of the output names matches an input names, it's just going to get translated like any other name.

      --
      Sometimes it's best to just let stupid people be stupid.
    18. Re:One of my favorites by Reality+Master+101 · · Score: 1

      the easy way or the hard way?

      That's pretty much it. The hard, slow way is to loop over the bits, doing one at a time. :)

      --
      Sometimes it's best to just let stupid people be stupid.
    19. Re:One of my favorites by HaggiZ · · Score: 1

      I'm a vb developer:

      Dim vDay as variant
      Dim vMonth as variant
      Dim vYear as variant
      MsgBox(WeekDayName(WeekDay(vDay&"-"&vMonth&"-"&vYe ar)))
      Exception

      ;)

    20. Re:One of my favorites by Anonymous Coward · · Score: 0

      Assuming the parser acts as a preprocessor, one line of the program at a time, it's never going to "assume" when it sees a variable that it could have possibly replaced it, because it hits everything linearly. It's going to check a hash to see if it's seen that variable name before so it can replace it with the same thing if it has, otherwise it'll replace it with the next name in sequence and hash that fact in case it sees that variable again.

      The method you seem to be assuming would be more complicated and also more bug-prone. Probably slower, too.

    21. Re:One of my favorites by flonker · · Score: 2

      It's simple enough for people who understand bits, but there are a LOT of people out there who don't understand bits and logical operators. Most people write a loop that does it one bit at a time.

      True enough. The subroutine thing requires too much actual work for me to try my hand at right now. I'd end up looking up the month in an array, getting the number of days passed so far this year, adding 1 if leap year and (month>2), then add year and some constant, and mod by 7.

      Here's a fun one. Without using any temporary variables, how would you exchange the values of two variables?

      Hint: There are at least two ways to do it in three basic instructions.

    22. Re:One of my favorites by Reality+Master+101 · · Score: 2

      That's an old ASM trick:

      A ^= (B ^ A)
      B ^= A;
      A ^= B;

      The second solution is to use addition/subtraction (which I leave as an exercise to the other readers. :) )

      --
      Sometimes it's best to just let stupid people be stupid.
    23. Re:One of my favorites by IpalindromeI · · Score: 2, Funny

      Can't you just xor all three numbers?

      return (a^b^c);

      --

      --
      Promoting critical thinking since 1994.
    24. Re:One of my favorites by Anonymous Coward · · Score: 0

      I'm assuming the parser is supposed to be smart enough so that it replaces all occurrences of each variable name within the program.

      I think it's implied that the output program should be semantically equivalent to the input program. If so, then this can be taken for granted. Otherwise you may as well just spew random output.

    25. Re:One of my favorites by Anonymous Coward · · Score: 0

      Uh, there is a temporary value on the first line. You need to store the result of B^A before xoring with A.

      I don't think there is anyway of swapping values WITHOUT using either a temporary variable, or having hardware support (like a bit rotation command that can rotate the upper bits into the lower and the lower in the upper).

    26. Re:One of my favorites by Gulthek · · Score: 2

      Because he's assuming that the parser program works like this:

      Say the program has a few variables, and that those variables are used multiple times within the program:

      integer1
      integer47
      var00002
      integer29

      As this process moves through the program, outputing a program with differed variable names, integer1 and all occurances of it become var00001, integer47 and all occurances of it become var00002. Hence, when the parser then reaches the variable that was initially var00002 it will conclude that var00002 is another one of the renamed integer47's. The parser can't simply increment and rename the variables if they occur multiple times. To do so would create a program containing entirely unique variable names, which could be a potential Bad Thing.

    27. Re:One of my favorites by Anonymous Coward · · Score: 0

      Interesting thread. Just an OT comment on your .sig though... what makes you think Europeans hate Americans?

      Look down their noses at, yes, envy, yes, pity, yes, laugh at, yes, shake their heads in disgust at, yes. Hate? Get off the crack, man... it wasn't Europeans who hijacked those planes...

      I realise this will be devestatingly difficult for you to get your head around but what happens to America and Americans really doesn't interest anyone other than Americans.

      Sigs like yours merely reinforce the perception that many otherwise seeminly intelligent Americans are just as blinkered, self-centered, self-important, arrogant and ignorant as popular belief suggests.

    28. Re:One of my favorites by MP*Birdman · · Score: 1

      A = A + B
      B = A - B
      A = A - B

      ?

    29. Re:One of my favorites by dietz · · Score: 2

      But that is, of course, a rather awkward way to write the program. You end up having to go through the entire program n times, where n is the number of different variables.

      Easier is to keep a hashtable of variable names. The first time you encounter 'integer29', you assign it to be, for example, 'var00005' and store that in a hashtable. The second time you encounter it, you check your hashtable and see that it's already been assigned as 'var00005' and replace it as such.

      Now when you run into existing variable 'var00023' for the first time, you check your hashtable and see that you don't already have an old variable named 'var00023', so you assign it a new name: 'var00046', for example. From now on, all 'var00023' become 'var00046'.

      This way, you rename all the variables in the entire program in one single pass.

    30. Re:One of my favorites by Anonymous+DWord · · Score: 2

      How 'bout in Perl:
      ($var1, $var2) = ($var2, $var1);

      C is for suckas who like to type. :-P

      --
      "If he thinks he can hide and run from the United States and our allies, he's sorely mistaken." Bush on bin Laden
    31. Re:One of my favorites by nullard · · Score: 1
      A=A+B
      B=A+B
      A=B-A
      B=B-A
      B=B-A
      Example:

      A| B|COMMAND
      -----------
      5| ?|A=5
      -----------
      5| 3|B=3
      -----------
      8| 3|A=A+B
      -----------
      8|11|B=A+B
      -----------
      3|11|A=B-A
      -----------
      3| 8|B=B-A
      -----------
      3| 5|B=B-A
      --


      t'nera semordnilap
    32. Re:One of my favorites by flonker · · Score: 2

      I think you misremembered that. It's actually, A ^= B B ^= A A ^= B For example, A = 1100 B = 1010 And to prove it: A^B= 0110 =1100^1010 B^A= 1100 =1010^0110 A^B= 1010 =0110^1100

    33. Re:One of my favorites by flonker · · Score: 2

      Oops, forgot to post as "Plain Old Text"

      I think you misremembered that. It's actually,
      A ^= B
      B ^= A
      A ^= B

      For example,
      A = 1100
      B = 1010

      And to prove it:
      A^B= 0110 =1100^1010
      B^A= 1100 =1010^0110
      A^B= 1010 =0110^1100

      The other solution is:
      A=A+B
      B=B-A
      A=A-B

    34. Re:One of my favorites by LadyJessica · · Score: 1

      ...it's an easy trap to fall into, and I've caught some really bright people with it.

      Which is why I think these types of interview questions are bad for a company. Would you reject someone because they didn't give the right answer? Then why are you wasting time asking it?

      Those kinds of questions are esoteric and contrived, and it doesn't tell you how adaptable someone is, or what their experiences have been. I've interviewed a number of people for senior development positions and I tend to be more interested in them talking than thinking about a riddle. I usually ask them to describe problems they've faced and how they solved them, instead of giving them artificial problems to solve on the fly.

      Usually I find that an interview goes very fast when I'm on this side of the table. I'm always pressed for time. I certainly don't want to waste it with riddles, I want to try to get to know someone, and really find out if they can contribute to my team.

      On the other hand, maybe I will use your question if we ever need to hire a riddle-solver. :-)

      -- LadyJessica

      --

      -- Jessica
      The mutant geek grrl from Hell.

    35. Re:One of my favorites by Henry+V+.009 · · Score: 5, Funny

      How is the view from the Ivory Tower?

      Here is what actually happens:

      I have 25 minutes to write out the parser. It's 11:35am September 30th, and our guys in marketing promised that C-Checker 5500 would be out in September. If its not finished on time, management will start complaining that we need to double the number of programmers or something crazy like that.
      The hard part of the problem is variable identifiction. Have to look up the standard keywords again and type them in, and make allowance for a couple of other things.
      After finishing that part I've got 10 minutes left.
      Now I zip through with a little routine that takes the first varible it comes across and replaces it and all future occurences of it with VAR#1, and so on.
      So I run my program on the main development project to test it out.
      I press compile on the modified program. Cherchunketa, cherchunketa --- boom! Compilier error messages out the wazoo.
      Who the hell named his loop counter VAR#37534? Goddamn that bastard! Who the hell does something that crazy?
      Now I have 3 minutes to implement the fix. Do I write in the simple check algorithm that all the CS students you managed to trick came up with?
      Hardly, I rename the thing to VARXY750#XXXXXX, and wait for a bug report.

      As for the triple redundancy problem. Before you start going into your ANDs and ORs and wherefores, there are a few things to keep in mind. First off, if its really important, you need some non-local copies. What if there is a hard-drive crash? Or a nuclear war? The internet will still be around even if the main office is a glassed over glowing area in the North Western U.S. If it's important enough for triple redundancy, it's important to survive any forseeable catastrophe isn't it? So now you have to encrypt the numbers coming and going, and sign it, to keep the hackers from fooling you.

      And so what is the easiest way to implement all this? Simple--there is no simple way. It'll take a lot of work. So you might as well throw your computer out of the window and tattoo the number to the back of your hand.

    36. Re:One of my favorites by obsidian+head · · Score: 3, Interesting

      Optimize the common case, which usually is if the numbers are identical:

      ; XOR the ints, and OR the result
      (or (xor int1 int2) (xor int1 int3))

      If the result of this expression is 0, just return int1.

      Profiling of course is needed.

    37. Re:One of my favorites by The+Cat · · Score: 5, Insightful

      I've caught some really bright people with it.

      So, what's the point again? Proving people aren't as bright as they think? Making people sit there and squirm because they really need a job, are nervous anyway, and have some "three cups and a white marble" puzzle standing between them and feeding their kids?

      I don't get it. My first question would be "why don't we just hire the bright people and get back to work?"

    38. Re:One of my favorites by DavidTC · · Score: 1
      It's a bit more than a 'potentially' bad thing, it will completely destroy the usefulness of any variables. To be useful, a variable has to to be set at some point, and read at another, otherwise there was really no point, was there?

      The problem is that he's making assumptions about how a program is written, and other people are making other assumptions, and he's decided his way is the 'correct' way, except the question is implying the other way is in use (after all, the other way is the only way you'd need to worry about existing variable names conflicting.), so he's more 'clever' than people, because they follow the assumption of the question.

      Which is actually what a few of the 'harder' logic problems really are, someone making up insane circumstances so they're 'more clever' than other people.

      --
      If corporations are people, aren't stockholders guilty of slavery?
    39. Re:One of my favorites by Anonymous Coward · · Score: 0

      Bah. Why not condense it a bit more by using:
      A ^= B ^= A ^= B
      ?

    40. Re:One of my favorites by po8 · · Score: 3, Informative

      You're neither one as 1334 as you think.
      Here's 4 operations:
      return (a ^ b) & c | a & b;
      (Extra parens are for wimps.)

      Show that it can be done in 3 C ops, or
      prove it impossible.

    41. Re:One of my favorites by CreatorOfSmallTruths · · Score: 1

      I couldn't agree more... It doesn't matter if there is nothing to be done or something to be done. Programming is about doing the best you can in the time you have. And no riddles can prepare you for that. I had riddles, more than my fair share. Some I solved, some I didn't. The main question is Why the *hell* does anyone in their right mind think programming and silly riddles go hand in hand ? I know of brilliant people (riddle wise) who couldn't code "hello world" even if their life depended on it... So, you say to yourself, ok, I'll do your riddles, test me, then you get kicked out of some job interview because you couldn't cut the cake right... right... and being a chef is the first thing a good programmer needs, eh... I think riddling is stupid. Sorry, but that's the way it is. it doesn't measure anything but the interviewer weakness of asking really important stuff like "we are on the eve of a deadline, you have tickets for a show - will you stay and help or go watch the show?" Me.

    42. Re:One of my favorites by Anonymous Coward · · Score: 0

      Yeah, who needs the braces! You should have to stop and look at the order of operations to know what is going on.

      And you should never break up operations onto separate lines to allow easy step-through when debugging. Evaluate everything you can all together.

      But you forgot to mention that you should always call functions like this:

      a(b(c()), d(f(), e(g())));

      rather than evaluating results and storing in intermediate variables. Don't ever trust a compiler to optimize, you have to do it yourself.

      But apart from that you guys are SO elite!

    43. Re:One of my favorites by Anonymous Coward · · Score: 0

      Because you're assigning to the same variable more than once between sequence points.

    44. Re:One of my favorites by plumby · · Score: 2

      Great if the variables are numeric. Works less well with strings.

    45. Re:One of my favorites by clickety6 · · Score: 1
      And now write it in such a way that the poor sod who gets to maintain your program 3 years from now can tell what is going on because you didn't include any comments ;-)

      There may be a fast way, but is it as easy to undertsand as the slow way?

      --
      ----------------------------------- My Other Sig Is Hilarious -----------------------------------
    46. Re:One of my favorites by Bishop923 · · Score: 1

      I can't speak for the logical method but...
      The other solution is:
      A=A+B
      B=B-A
      A=A-B


      This is Flawed

      Case: A = 2 B = 3

      A = 2 + 3 = 5
      B = 3 - 5 = -2
      A = 5 - (-2) = 7

      It should be:
      A = A+B (2+3 = 5)
      B = A-B (5-3 = 2)
      A = A-B (5-2 = 3)

    47. Re:One of my favorites by Anonymous Coward · · Score: 0

      Well known trick, and a buggy one. Do you see what happens when A and B are aliases of the same variable?

    48. Re:One of my favorites by krugdm · · Score: 2

      Use this...

    49. Re:One of my favorites by muffel · · Score: 1
      How about a bit more obfuscated (but actually straight forward):

      (a&~(a^b))|(c&(a^b))

      with the added bonus of using all 4 logical operators ;o)

      --

      bla
    50. Re:One of my favorites by spotter · · Score: 2

      3 integer variables a, b, c

      (a & b) | (b & c) | (c & a)

      so the "and's" are any 2 of the variables, if the bit is true, it will be one, and the "or's" will accumulate the multiple "votes"

      anyways, thats just what I thought of off the cuff, perhaps thats the slow way you mentioned.

    51. Re:One of my favorites by Anonymous Coward · · Score: 0

      Even strings are made up of bits.

    52. Re:One of my favorites by Fjord · · Score: 2

      Hmmm, I got a completely different answer:
      d=a^b;
      return d&a|~d

      d holds where a and b agree, and thus outvote c. ~d is logically where c must be partaking in a winning vote (although it could be winning in some d bits as well).

      --
      -no broken link
    53. Re:One of my favorites by jholder · · Score: 1

      #include
      /* mon is 0-11, day is 0-30, year is years since 1900. return is days since sun
      day (0-6) */
      int dweek( int mon, int day, int year )
      {
      struct tm ts;
      time_t t;
      ts.tm_mon=mon;
      ts.tm_mday=day;
      ts.tm_year=year;
      t = mktime( &ts );
      localtime_r( &t, &ts );
      return ts.tm_wday;
      }

      --
      -- John
    54. Re:One of my favorites by jeremyp · · Score: 2


      (1 xor 1) xor 0 = 0 xor 0 = 0

      Not what you wanted.

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    55. Re:One of my favorites by Kris+Warkentin · · Score: 2

      My first cut was (( A | B ) & C ) | (( C | B ) & A ) but I'm sure it can be simplified yet.

      --

      In Soviet Russia, hot grits put YOU down THEIR pants.
    56. Re:One of my favorites by Reality+Master+101 · · Score: 2

      Oops... you're right. I knew I shouldn't have posted just before I went to bed. :)

      --
      Sometimes it's best to just let stupid people be stupid.
    57. Re:One of my favorites by Reality+Master+101 · · Score: 2

      Actually, that question I always put on the end of the test as a "bonus question that doesn't count" just to see how they're doing under pressure. :)

      My first question would be "why don't we just hire the bright people and get back to work?"

      Have you ever actually hired anyone before? When you put a job ad in the paper (depending on the job market, of course) you get about 100 resumes. Of that, you have to pair it down to 5-10 applicants to call in. Generally speaking, the people who are the best bullshitters are the worst employees, so you need to have SOME sort of system to filter those out. Just having a conversation is the worst way to do it -- you introduce your own biases into the interview process, and hire based on whether you like them or not.

      If only it was as easy as "hire the bright people". That's what the test is supposed to figure out. Who is bright and who isn't. The trick of course is giving good questions that don't require you know the "gotcha" to get right.

      --
      Sometimes it's best to just let stupid people be stupid.
    58. Re:One of my favorites by Shabazz · · Score: 1

      I take it all back. Mine fscks up if all three agree. Oops.

    59. Re:One of my favorites by flonker · · Score: 2

      heh. You're right, of course. oops.

    60. Re:One of my favorites by Virtex · · Score: 2

      If you're making a pass through a program and see a variable, then you have to replace it, period. The only variables that have been converted have already been passed by your parser. So you would want to convert every variable you come to. Deciding what to convert it to is accomplished by a table.

      To answer the original question, if you come across a variable VAR######, you would convert it just like any other variable. As an example, suppose I have a program with these 3 variables:

      loop
      sum
      VAR000001

      They could be converted like this:

      loop --> VAR000001
      sum --> VAR000002
      VAR000001 --> VAR000003

      Get it?

      --
      For every post, there is an equal and opposite re-post.
    61. Re:One of my favorites by YottaMatt · · Score: 1

      Given 3 ints, called A, B and C; We'll take the average quickly and systematically with a handful of fast bit operations like this: Check for contention in A & B with D: D = A XOR B you can optimise this by returning A immediately if D = 0 Otherwise we set the Bits in contention, first the 1s: A = A OR ( C AND D ) second the 0s: A = A AND ( C OR NOT D ) And now A is the median average of A, B and C, In fewer than 10 bitwise operations.

    62. Re:One of my favorites by Anonymous Coward · · Score: 0

      return((a & (b | c)) | (b & c))

      4 ops.

    63. Re:One of my favorites by Anonymous Coward · · Score: 0

      Hey, "nothing" was also the answer to another riddle posted on this topic: What is greater than god, more evil than the devil, rich people want it, poor people have it, if you eat it you will die. "Nothing" rocks!

    64. Re:One of my favorites by Tablizer · · Score: 2

      Making people sit there and squirm because they really need a job, are nervous anyway, and have some "three cups and a white marble" puzzle standing between them and feeding their kids?

      Yip, life sucks.

      Anyhow, I wonder what would happen if an organization hired only people with top grades and/or scored well on such puzzles?

      The closest I know are some government agencies that are characterized as being full of rude insular aholes.

      (Jeez, I'm qalified.)

    65. Re:One of my favorites by The+Cat · · Score: 2

      Have you ever actually hired anyone before?

      Yes I have, as a matter of fact. It took me all of 10 minutes to determine whether someone was qualified, and they were working in 11. I don't have time for all the esoteric middle management seminar strategies.

      If they don't know all the details, they can learn. Just hiring good *people* solves all the other problems, and saves a ton of time in the process.

      your own biases into the interview process, and hire based on whether you like them or not.

      This is exactly what most companies do, and it is exactly why they a) can't produce anything of value and b) go out of business. The empire-building middle managers don't have the foggiest idea how to build or lead a team, and they most certainly aren't going to listen to anyone's advice, because they are *so* much smarter than everyone else.

      If only it was as easy as "hire the bright people".

      It is that easy. The reason the workplace is so screwed up is because companies make things far more complicated than they need to be. Hire the right person and MOVE ON. It doesn't have to become a major six-week CYA production.

    66. Re:One of my favorites by Reality+Master+101 · · Score: 2

      It took me all of 10 minutes to determine whether someone was qualified [...] Just hiring good *people* solves all the other problems, and saves a ton of time in the process.

      Well, I congratulate you on your psychic abilities to figure out someone's intelligence in 10 minutes.

      This is just absurd. If you actually hired someone very valuable off the street this way, then you either 1) got lucky, 2) trusted the resume (and got lucky), or 3) have pretty low standards.

      Why do you think I administer a test of someone's thinking ability, rather than just quiz them on their "qualifications" for 10 minutes and then roll the dice? The whole point of the testing process is to see if someone is capable of solving problems, not just quoting qualifications at me. If someone can think, then chances are they can learn to do the job.

      and they most certainly aren't going to listen to anyone's advice, because they are *so* much smarter than everyone else.

      Sorry, but if you're flippantly judging people in 10 minutes, you're not impressing me with your intelligent hiring process. Maybe your managers really are smarter than you, and you just have an attitude problem.

      --
      Sometimes it's best to just let stupid people be stupid.
    67. Re:One of my favorites by yalurker · · Score: 1

      As for the triple redundancy problem. Before you start going into your ANDs and ORs and wherefores, there are a few things to keep in mind. First off, if its really important, you need some non-local copies. What if there is a hard-drive crash? Or a nuclear war? The internet will still be around even if the main office is a glassed over glowing area in the North Western U.S. If it's important enough for triple redundancy, it's important to survive any forseeable catastrophe isn't it? So now you have to encrypt the numbers coming and going, and sign it, to keep the hackers from fooling you.
      I was thinking this redundancy might be useful in a space probe, where you can't rely on your memory to be error-free over its lifetime, for example, 30 years in the case of pioneer10. Getting the result in the fewest ops would be especially useful on a chip from 30 years ago.
      I wouldn't use it for an interview question, though.
    68. Re:One of my favorites by HD+Webdev · · Score: 1

      Anyhow, I wonder what would happen if an organization hired only people with top grades and/or scored well on such puzzles?

      That one's easy. The business would be knee-deep in discrimination lawsuits.

      --
      This is not a dream, not a dream...we are transmitting from the year 1-9-9-9.
    69. Re:One of my favorites by Sri+Lumpa · · Score: 1

      in ASM:

      XOR EAX, EBX
      XOR EBX, EAX
      XOR EAX, EBX

      in C:

      From the grandparent post I assume ^ is XOR in C, I don't remember given that i haven't programmed in C in a while. The explanation at the right use A and B to indicate the original value of A and B.

      A ^= B;// Put A XOR B in A.
      B ^= A;// Put B XOR (A XOR B) (which was in A) in B // This is equal to A
      A ^= B;// Put (A XOR B) XOR A (given that the variable B contains the value that originally was in A now) which is equals to B.

      The first line compute the XOR of A and B.
      The second line put the original value of A in B.
      The third line puts the original value of B in

      Just 2 variables necessary.

      --
      "The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers." Bill Gates,
    70. Re:One of my favorites by The+Cat · · Score: 2

      Well, I congratulate you on your psychic abilities to figure out someone's intelligence in 10 minutes.

      It doesn't take psychic abilities. After 10 minutes, I can tell if someone has the motivation and ability to do a job. Anything more than that, and the interviewer is luxuriating in their self-important "more-senior-than-thou" role. Those kinds of interviews are not tolerated in my company.

      This is just absurd. If you actually hired someone very valuable off the street this way, then you either 1) got lucky, 2) trusted the resume (and got lucky), or 3) have pretty low standards.

      Yeah. That must be it. I've got low standards. It's got to be *something* other than "I think this person can do the job."

      Why do you think I administer a test of someone's thinking ability, rather than just quiz them on their "qualifications" for 10 minutes and then roll the dice?

      I have no idea. It's a roll of the dice anyway.

      I like putting qualifications in quotes. So every candidate is lying and really isn't qualified, right? They're all slick con-artists who don't know anything. The degree and the years of experience? All skate-through half-baked lies, right?

      Hey, I already knew this is what is going through an interviewers mind. Every candidate starts from their own 10 yard line. Of course, this is also why companies can fire thousands at the slightest whim.

      W-4 employment is pointless.

      No wonder we have the highest unemployment in over 10 years.

      Sorry, but if you're flippantly judging people in 10 minutes, you're not impressing me with your intelligent hiring process.

      Yes, it's got to be flippant. That must be it.

      Maybe your managers really are smarter than you, and you just have an attitude problem.

      I don't have a manager, but if I did, I'm sure they would think I have an attitude problem, mainly because I probably wouldn't agree with them 100% of the time. No, I know I wouldn't agree with them 100% of the time.

      Modern business has no tolerance for any contrary views, no tolerance for discussion and debate, and no tolerance for real, responsible decision making from management.

      Middle management's ONLY JOB is to make decisions, and they abrogate that role by drenching everything in backtracking documentation and self-important committee-think "initiatives" which accomplish nothing except to provide the illusion that something is happening when in reality they aren't doing their job.

      When these managers make mistakes, they then proceed to make excuse after excuse: "well, the resume said.." or "well, the interview committee standards are..." or whatever. What they SHOULD do is say "Yeah, I made the call, and I screwed up." and MOVE ON.

      It is for this reason that modern business cannot a) produce anything of value or b) stay in business very long. The entire business day is voice mail, meetings, coffee rooms, talking to "Bob" and donut lists. Actually *producing* anything is left to the cubicle drones, if they ever hire any.

    71. Re:One of my favorites by Reality+Master+101 · · Score: 2

      So every candidate is lying and really isn't qualified, right? They're all slick con-artists who don't know anything. The degree and the years of experience? All skate-through half-baked lies, right?

      If you actually had any experience with a testing process, and hiring a lot of people, you would know that YES YES YES the majority of people skate through half-baked lies. I couldn't have put it better myself.

      I'm sure they would think I have an attitude problem, mainly because I probably wouldn't agree with them 100% of the time. No, I know I wouldn't agree with them 100% of the time.

      I just have to laugh at this. Don't think that JUST MAYBE if you are disagreeing with someone 100% of the time, then you have severe problems with authority? That you don't really have any opinions of your own; you only have opinions contrary to whomever you interpret as an authority figure?

      Modern business has no tolerance for any contrary views, no tolerance for discussion and debate, and no tolerance for real, responsible decision making from management.

      Sorry, but you have absolutely no idea what you're talking about. That whole rant is so divorced from reality, I doubt that you have very much experience in the real world. This is so caricatured it's kind of nutty.

      Yes, it's got to be flippant. That must be it.

      If you are judging someone in 10 minutes, then by definition it's a flippant decision.

      --
      Sometimes it's best to just let stupid people be stupid.
    72. Re:One of my favorites by The+Cat · · Score: 2

      Don't think that JUST MAYBE if you are disagreeing with someone 100% of the time, then you have severe problems with authority?

      Well, aside from the fact that you misread the sentence, yes, I have problems with self-appointed "authority" who is far more concerned with reminding people of the power vested in them by the power vested in them than they are with supporting the people who work hard for them and earning their respect.

      That you don't really have any opinions of your own; you only have opinions contrary to whomever you interpret as an authority figure?

      I have many opinions of my own. I am very well educated and have a lot of experience. Most companies I have worked for have actively and vigorously discouraged the application of that knowledge to my job, and done the exact same thing to EVERY SINGLE OTHER PERSON I KNOW OR HAVE EVER WORKED WITH.

      Sorry, but you have absolutely no idea what you're talking about. That whole rant is so divorced from reality, I doubt that you have very much experience in the real world.

      No idea what I'm talking about. lol I have seven years of experience as a senior engineer.

      I have seen people with five years of seniority FIRED because they disagreed passionately about a "flippant" management decision. They stood up for what they believed in, and it cost them their careers. That's reality in "corporate" business these days, and it's a crying tragic shame.

      I know one person in particular who was labeled a "troublemaker" because they offered a dissenting opinion in front of senior managment during a "standards process" presentation. Two months later, the three middle managers (who were shown to be wrong at that presentation by the way) had that person fired. One year later, he, his wife and their three small children lost their house. It took him 15 months to find another job. Why? He disagreed.

      If you are judging someone in 10 minutes, then by definition it's a flippant decision.

      I'm not "judging" anyone. I'm making a *decision* as to whether they can do the work and if they are motivated.

    73. Re:One of my favorites by Reality+Master+101 · · Score: 3, Interesting

      and done the exact same thing to EVERY SINGLE OTHER PERSON I KNOW OR HAVE EVER WORKED WITH.

      Sorry, but you just don't sound credible. You sound like a prima donna who walks around with a chip on her shoulder.

      I have seen people with five years of seniority FIRED because they disagreed passionately about a "flippant" management decision.

      And I've seen people fired because they can't get over themselves and the fact that a decision has been made contrary to what they want. And then they cry like little babies, and are finally fired because of a constant pattern of not being able to handle not always getting their own way.

      Just because you're arrogant doesn't make you always right.

      I know one person in particular who was labeled a "troublemaker" because they offered a dissenting opinion in front of senior managment during a "standards process" presentation.

      And once again, you just don't seem credible on this. I have a feeling that there is a LOT more to the story and this person's historical pattern of behavior.

      I'm not "judging" anyone.

      Oh please, spare me the politically correct "I never judge anyone" nonsense. Unless you always hire whoever is in front of you, you are making a judgement.

      I'm making a *decision* as to whether they can do the work and if they are motivated.

      Right, a 10 minute decision. Let me turn this around -- if you went for an interview, and some guy talks to you for 10 minutes, and then says "Sorry, your resume is fine, but based on this interview I just don't get the feeling you can handle this job" (assuming he was a rude SOB), are you going to feel that you got a fair interview?

      --
      Sometimes it's best to just let stupid people be stupid.
    74. Re:One of my favorites by Tablizer · · Score: 2

      (* That one's easy. The business would be knee-deep in discrimination lawsuits. *)

      What kind of discrimination? Mental discrimination? Or do you mean like minority X will complain that because they are brought up "without opportunities" that they will score lower? (Which does not explain why dirt-poor vietnamese refugees often excell in school.)

    75. Re:One of my favorites by HD+Webdev · · Score: 1

      Exactly.

      US law prohibits any testing which doesn't a) directly apply to the job the applicant is applying for and b) have equivalent (percentage) scoring outcomes regardless of gender or race.

      For example, if a higher proportion of females pass a given pre-employment test than men, the business is automatically wide-open to discrimination lawsuits. The business is guilty of discriminating against men in that example.

      --
      This is not a dream, not a dream...we are transmitting from the year 1-9-9-9.
    76. Re:One of my favorites by ScottForbes · · Score: 1
      You the man! Here is your honorary degree.

      Not so fast. The requirement was that your parser translate variable names to "VAR######", where ###### is an integer incremented for each unique variable name. If the input contains variables named Tom, Dick, Harry and VAR909090, then your output had better have VAR000001, VAR000002, VAR000003 and VAR000004, or your crummy parser is going to break my post-processing code.

      If the original requirements had said "VAR######, where ###### is a unique six-digit integer", then your parser might not need to rename variables that are already in this format -- but when your parser encounters a source file with variables named Tom, Dick, Harry and VAR000002, the output had better not be VAR000001, VAR000002, VAR000003 and VAR000002.

      Points off for both professor and student, and show your work next time. :-)

      (Oh, and a real requirements writer would specify whether the integers in question started with 000000 or 000001, unless said writer wanted the developers to use the tongs.)

    77. Re:One of my favorites by Tablizer · · Score: 2

      US law prohibits any testing which doesn't a) directly apply to the job the applicant is applying for and b) have equivalent (percentage) scoring outcomes regardless of gender or race.....
      For example, if a higher proportion of females pass a given pre-employment test than men, the business is automatically wide-open to discrimination lawsuits. The business is guilty of discriminating against men in that example.


      Are you sure about this? It sounds a little suspect.

    78. Re:One of my favorites by The+Cat · · Score: 2

      And I've seen people fired because they can't get over themselves

      Well, there you go. They don't give management their proper respect by supplicating their own confidence, so the wheels turn them out in the street along with all their knowledge and ability so management can go back to meetings and donuts without being interrupted by competence and initiative.

      These same managers advertise for self-starters: highly intelligent, well-educated, motivated people with sparkling resumes, advanced degrees and years of huge achievements and experience who *once they are hired* are expected to shut up, sit down and do as they are told (just like Junior High School). If they open their mouths, they get fired.

      People with all those achievements and education are rarely (if ever) people who don't have some fairly well-ingrained ideas of how things should be done. They wouldn't *have* those resumes if it were otherwise. Yet management expects them to just do as they are told and *refrain from offering any input or contribution* or pack up and leave.

      That's not the right way to run a company. Hire, delegate and MOVE ON.

      And once again, you just don't seem credible on this. I have a feeling that there is a LOT more to the story and this person's historical pattern of behavior.

      You mean prior to being hired? (Note: I don't really care if I "seem credible")

      He had been working there about as long as I had, say four to five months. They hired him (and me and several others) *specifically* because of his knowledge of software development.

      He was fired because he disagreed. Period. He was told in the week prior (during a project status meeting, what a surprise) that management "felt" he wasn't being enough of a "team player."

      I quit three weeks after he was fired. Of the 10 people hired for our team, all had left (or been fired) within six months. The company was out of business within a year, when 200 more lost their jobs.

      if you went for an interview, and some guy talks to you for 10 minutes, and then says "Sorry, your resume is fine, but based on this interview I just don't get the feeling you can handle this job"

      I'd throw a party to celebrate the return of honesty to the job market.

    79. Re:One of my favorites by HD+Webdev · · Score: 1

      Here are some uslaw.com references for example.

      General hiring guidelines

      Testing guidelines

      --
      This is not a dream, not a dream...we are transmitting from the year 1-9-9-9.
    80. Re:One of my favorites by adamsc · · Score: 2

      If it changes *every* variable there's no difference between "Tom" and "VAR000002" - neither variable will have its original name in the end. This also illustrates why this problem isn't just a repeated string replacement.

    81. Re:One of my favorites by Tablizer · · Score: 2

      This is the only part I saw relavent:

      "But even this last requirement is changing. Some rejected job applicants have filed suit under the Americans with Disabilities Act, claiming that they suffer from learning disabilities and charging that they were illegally discriminated against because they weren't given extra time to take a pre-employment test. Blind applicants may need to have tests provided in something other than written form (such as braille), and deaf applicants may need to have translators provided to assist them in the test taking process."

      I suppose the "learning disabilities" issue may come up if it is a non-technical or non-clerical job. I hardly think anybody would complain if it was a technical or clerical job, where learning disabilities may clearly affect the job performance.

    82. Re:One of my favorites by Anonymous Coward · · Score: 0

      I don't suppose you have need of a new CS grad?

      Damnable job market. Pounding fence pickets is getting to be a bit tiresome (not to mention tiring).

    83. Re:One of my favorites by lewis2 · · Score: 1

      a bit late, but I just read it...

      return (a|b) & c

    84. Re:One of my favorites by po8 · · Score: 1

      Nah. In this formula, 0 bits in C "outvote" bits that are 1 in both a and b: e.g., let

      a = 1
      b = 1
      c = 0

      and note that the answer is wrong.

    85. Re:One of my favorites by HD+Webdev · · Score: 1

      Here is a better one.

      Employment Discrimination

      ...A. Procedure having adverse impact constitutes discrimination unless justified. The use of any selection procedure which has an adverse impact on the hiring, promotion, or other employment or membership opportunities of members of any race, sex, or ethnic group will be considered to be discriminatory and inconsistent with these guidelines...

      --
      This is not a dream, not a dream...we are transmitting from the year 1-9-9-9.
    86. Re:One of my favorites by lewis2 · · Score: 1

      You are right of course. Here's 1.1

      return c ? a|b : a&b

    87. Re:One of my favorites by po8 · · Score: 1

      Doesn't work now for c values > 1. The whole
      point in the first place was to do all the bits in parallel. Consider

      c = 0b10
      a = 0b11
      b = 0b00

      c ? a | b : a & b == 0b11

      which is "half right".

      In short, ?: is not a bitwise operator.

  12. No answers to the riddles by Anonymous Coward · · Score: 1, Interesting

    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.

    1. Re:No answers to the riddles by MayorQ · · Score: 1

      Wrong. If you have sex without an orgasm, you're doing it incorrectly. And the best part is the practice.

      - MayorQ

    2. Re:No answers to the riddles by DJayC · · Score: 1

      Yeah I ran into that same problem :) A great way to figure out the answers is to run some searches on Google for what seem to be the key points and ideas in the riddle. It worked on most of the ones I wanted answers to so far, and my google search skills are getting better by the second.. I'll have to put that on my resume ;-)

    3. Re:No answers to the riddles by pokeyburro · · Score: 2

      Try sneezing. It's like an orgasm without the sex. ;-)

      (Or the dinner & movie, or the having to call afterward, or the child support...)

      --
      Lately democracy seems to be based on the skybox, the Happy Meal box, the X-box, and the idiot box.
    4. Re:No answers to the riddles by styrotech · · Score: 1

      You're making me doubt whether I've ever had a sneeze...

  13. Unfortunately, the site's been /.ed already. Even worse, there's no Googlecache. Oh well.

  14. Riddler by Anonymous Coward · · Score: 3, Interesting

    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?

    1. Re:Riddler by Anonymous Coward · · Score: 0

      Bugger me!

      Tell me the answer quick so I can get a lay out of my geek gf.

    2. Re:Riddler by Skyshadow · · Score: 1
      You asshole, my brain just dumped core and locked up. I think I might have damaged my CPU.

      If I don't get an answer to this one in the next couple of days, I swear to God I'm climbing a clock tower with a high-powered rifle...

      --
      Every year during my review, I just pray the words "slashdot.org" aren't mentioned.
    3. Re:Riddler by Anonymous Coward · · Score: 0

      News for Nerds. Stuff that matters.

      From the front lines (Jon Katz).

      Geek sniping from clock tower (even now)

      A low user ID /. Geek has taken to himself to shoot people below from the clock tower in little rock, Kanas (or some place where kids in 1997 staged an aborted coup in their high schools killing several of their fellow siblings).

      The Low ID user has not been ID'd as SkyShadow of SlashDot. CNN reports that FBI has classified this threat to be of terroristic nature and all calls to 9 oh one one are being held due to +++ATH0.

      I pledge my allegence to the geeks of slashdot and pray to our God that this geek sees some sense and never commit any more collumbine.

      BTW. Men in Black is a good movie that tried to portray the life of SkyShadow.

      Truly an American Thesbian.

      Highly mixed.

    4. Re:Riddler by Anonymous Coward · · Score: 0

      C a n . eye . H a v e . a . H i n t ?

      OR.

      1. Is is a software product?
      2. Is it hardware? (if so is it related to networking? say ethernet?)

      Answer pls, cause brain is exploding too.

    5. Re:Riddler by Anonymous Coward · · Score: 0

      What I thought, fourier series == hardware on networking. But then I saw (can be made), this means it can be made like 'Gnu make?'. Then the bit about pruning, trees are pruned (specially in networking -- ala broadcasting/routing?). But what confuses me is the mixed software/hardware feature of this riddle. What about the version numbering? Possibly the project became something else then change number from 1,2 to 6X ?

    6. Re:Riddler by David+Gerard · · Score: 2

      Emacs, obviously.

      --
      http://rocknerd.co.uk
  15. Good questions at a tech interview by openSoar · · Score: 1

    asking an interviewee to create a programming problem for others to solve is sometimes a good way to check if they truly understand a subject.

  16. I Believe! (RE: Important) by Anonymous Coward · · Score: 2, Funny
    "For 52 years I have turned the cheeks in all directions to the actions of people like you."

    I believe you are the guy on goatse.cx.

  17. Well, he failed one riddle: by Hektor_Troy · · Score: 2

    "Write a program that will display a "spiral" of NxN numbers, using constant space (no arrays allowed). For example, here's what the spiral looks like for N=10:"

    And then he displays a spiral that's 11x10 ... nice ...

    --
    We do not live in the 21st century. We live in the 20 second century.
  18. TWO CONDOMS, THREE WOMEN by 0xdeadbeef · · Score: 5, Funny

    A man would like to have safe sex with three women, any of whom may be carrying an STD. Given two condoms, how can he do so, while ensuring that no STD is passed from one woman (or possibly himself) to another (or to himself)?

    This is a common situation on the job. Who says riddles aren't relevant in interviews?

    1. Re:TWO CONDOMS, THREE WOMEN by Anonymous Coward · · Score: 0

      I might have the solution but one question... Would one get STD from anal sex?

    2. Re:TWO CONDOMS, THREE WOMEN by renehollan · · Score: 1
      As an off-topic public service anouncement, yes.

      Though, I do not, repeat not, speak from experience.

      --
      You could've hired me.
    3. Re:TWO CONDOMS, THREE WOMEN by Anonvmous+Coward · · Score: 2
      A man would like to have safe sex with three women, any of whom may be carrying an STD. Given two condoms, how can he do so, while ensuring that no STD is passed from one woman (or possibly himself) to another (or to himself)?
      Hmm I think your post is the sole reason that the site got Slashdotted.
    4. Re:TWO CONDOMS, THREE WOMEN by Anonymous Coward · · Score: 0

      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, :-)

    5. Re:TWO CONDOMS, THREE WOMEN by jred · · Score: 5, Funny

      Ok, I like the other guys' answer, about wearing both & flipping it. But I think that would suck. I don't mind wearing one, but two at once just isn't going to work for me. So I use condom 1 on girl 1, condom 2 on girl 2, meanwhile having sent girl 3 to the store to get more condoms :)

      --

      jred
      I'm not a mechanic but I play one in my garage...
    6. Re:TWO CONDOMS, THREE WOMEN by Anonymous Coward · · Score: 0

      you missed the "or possibly himself" clause.

    7. Re:TWO CONDOMS, THREE WOMEN by newt_sd · · Score: 1

      Just hurry up and do it we are nerds this may be our only shot. Is it a real girl? Check for a package!!!!

      --
      ***I GOT NUTHIN***
    8. Re:TWO CONDOMS, THREE WOMEN by Elwood+P+Dowd · · Score: 5, Interesting

      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.
    9. Re:TWO CONDOMS, THREE WOMEN by Anonymous Coward · · Score: 0

      bravo

    10. Re:TWO CONDOMS, THREE WOMEN by Anonymous Coward · · Score: 0
      Some parts will stick and some parts will stretch, leading to two broken condoms.
      pssst, lemme let you in on a secret... it's called "LUBE" and it will change your sex life, even if you only have sex with yourself...

      "Nobody likes that dry shit." - Skerik 2000-05-04

    11. Re:TWO CONDOMS, THREE WOMEN by Asprin · · Score: 2

      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.

      Indeed. My answer is not to have sex with any them.

      Seriously, think about it. Are you gonna trust a condom if you KNOW you're having sex with infected partners? Sorta makes you wonder if it's a good idea even when you *don't* know whether or not they're infected.

      --
      "Lawyers are for sucks."
      - Doug McKenzie
    12. Re:TWO CONDOMS, THREE WOMEN by Anonymous Coward · · Score: 0

      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, :-)


      Good stuff. Now if you can get your wood to stay up throughout the entire process, I'd like to hear from you.

    13. Re:TWO CONDOMS, THREE WOMEN by Anonymous Coward · · Score: 5, Funny

      Easy, its just a riddle... Very unlikely to occur in a real world situtation. It seems you guy are actually planning what you would do in such an event!

      "Oh no, 3 horny women and only 2 condoms...Thank god I read slashdot".

    14. Re:TWO CONDOMS, THREE WOMEN by Anonymous Coward · · Score: 0

      Wearing two condoms at once isn't safe anyway. However "safe sex" doesn't mean penetration. Just use the two condoms with two women and do something else, safe, with the third.

    15. Re:TWO CONDOMS, THREE WOMEN by DavidTC · · Score: 1

      And, seriously. Two women is enough at once. Then go out and take a break while you buy another damned condom. Sheesh, what is this, some sort of endurance test?

      --
      If corporations are people, aren't stockholders guilty of slavery?
    16. Re:TWO CONDOMS, THREE WOMEN by Anonymous Coward · · Score: 0

      You didn't get the job, sorry Mr Asprin.

      Its nice that don't want to have sex with these women, but its just an excuse for not solving the problem as to how you could have sex with the women.

    17. Re:TWO CONDOMS, THREE WOMEN by Anonymous Coward · · Score: 0

      The experience would be worth it. You only live once, and very few people ca honestly say they've been with 3 chicks at once. 2 maybe, but 3. Unless your name is Hef, I want to see some proof.

    18. Re:TWO CONDOMS, THREE WOMEN by AeiwiMaster · · Score: 1


      What is the optimal strategy if you got N condomes or how many girls can you have safe sex with if you got N condomes. ?

    19. Re:TWO CONDOMS, THREE WOMEN by fruey · · Score: 1
      You can't flip a condom and still satisfy the condition of not getting an STD from yourself.

      If you take standard condom best practices, you can't do it either. You can't wear both. You can rarely flip a condom (should use only once anyway)...

      Stupid question, if you ask me.

      --
      Conversion Rate Optimisation French / English consultant
    20. Re:TWO CONDOMS, THREE WOMEN by vidnet · · Score: 2, Funny
      Use the first condom on the first woman.
      Use the second condom on the second woman.
      Have the third woman pour motoroil over you, hang you upside down wrapped in gladwrap, and spank you with a bag of stale mushrooms.

      All work and no date makes Jack's imagination run wild.

    21. Re:TWO CONDOMS, THREE WOMEN by Anonymous Coward · · Score: 0

      N jonnies => 2N-1 chicks
      Always wear one your self.
      Use N-1 clean on top of original, use original, Use N-1 dirty on flipped on original.

    22. Re:TWO CONDOMS, THREE WOMEN by Anonymous Coward · · Score: 0

      Simple answer: Bukakke.

    23. Re:TWO CONDOMS, THREE WOMEN by fruey · · Score: 1

      Oh yeah, and the flipping means that the juices of the first woman will interact with your member. So you could still get any number of STDs. I say this problem is impossible.

      --
      Conversion Rate Optimisation French / English consultant
    24. Re:TWO CONDOMS, THREE WOMEN by c13v3rm0nk3y · · Score: 1

      Trick question!

      Since we can assume that this is a technical interview (given the OP), we know from anthropological studies of the North American geek that he'll know he's lucky to score with one out of the three.

      He'll go out on a date with the one chooses him, save the last condom "for the future" just in case, you know, she wants to do it again.

      And then goes play WarCraft.

      If the interviewee *could* actually make use of 3 condoms in a single session, instead of just talking about it, the alpha-female would be sure to snag hom for herself, anyway.

      --
      -- clvrmnky
    25. Re:TWO CONDOMS, THREE WOMEN by Anonymous Coward · · Score: 0

      no, they won't. You are still wearing the "inner" condom when you flip the original "outer " one. So, you are still protected.

    26. Re:TWO CONDOMS, THREE WOMEN by Arkaein · · Score: 1

      A lot of people have argued over the start with two condoms, flip the outside one, then take it off. Even assuming the condoms will not break, this does not work. The man is protected, but the last woman is touching a condom that has touched the side of the outer condom the first woman touched.

      Since a requirement is to not pass STDs between women, this solution is invalid.

    27. Re:TWO CONDOMS, THREE WOMEN by fruey · · Score: 1

      Then you lose on the fair use (use each condom once only) - and herpes could still get through anyway, with all the juices there will be in between the two condoms making their way around your uncovered parts :)

      --
      Conversion Rate Optimisation French / English consultant
    28. Re:TWO CONDOMS, THREE WOMEN by Anonymous Coward · · Score: 0

      Use the condoms with the first two. Have the third give you a handjob. Viola! Safe sex with all three.

    29. Re:TWO CONDOMS, THREE WOMEN by FKell · · Score: 1

      No, if the condoms are in fact unbreakable, this works:
      wear both condoms, one on top of another, have sex 1st girl
      remove outer condom, put it back on inside out, have sex 2nd girl
      remove outer condom completely. have sex 3rd girl
      try and figure out what to do with condom still on with 3 loads of man fun in it.

    30. Re:TWO CONDOMS, THREE WOMEN by FKell · · Score: 1

      hmmm...actually, you might be correct, now that I think about it, as the inside out condom will expose the condom under it to the fluids of the first girl... New solution!

      Sterilize the condom after the first use, hell they are "unbreakable" so that would then also lead them to be resistant to temperatures needed for sterilization process :)

    31. Re:TWO CONDOMS, THREE WOMEN by Anonymous Coward · · Score: 0

      It becomes much harder if you use Bill Clinton's definition of sex. Otherwise, get a handjob or give the third girl a pearl (perl?) necklace.

    32. Re:TWO CONDOMS, THREE WOMEN by Sri+Lumpa · · Score: 1

      No, because he always wears a condom with a side that only touched is penis, so he he mostly secure (unless it drips of course)

      --
      "The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers." Bill Gates,
    33. Re:TWO CONDOMS, THREE WOMEN by Anonymous Coward · · Score: 0

      How about:

      Use condom 1 on woman no. 1
      Use condom 2 on woman no. 2.
      Fake it with woman no. 3 and exaggerate wildly about the whole thing to your friends. Like you weren't going to anyway?

    34. Re:TWO CONDOMS, THREE WOMEN by Cow4263 · · Score: 1

      When somebody went out to the store to get some lube, why didn't they just pickup a friggin 3rd condom?

  19. WARNING!!! WARNING!!! by $beirdo · · Score: 1

    ARRRRRGGGHH!!! He didn't post the answers anywhere!!! I'M LOSING MY MIND WITH FRUSTRATION!!! Did anyone get the one about foot size and spelling bees??? My curiosity is eating me alive...

    1. Re:WARNING!!! WARNING!!! by Anonvmous+Coward · · Score: 2
      ARRRRRGGGHH!!! He didn't post the answers anywhere!!!
      I know why. My company recruited for engineers through a headhunter service. For the first couple of days, the 'riddles' we used were getting only soso results from the candidates. By the 3rd day, everybody was getting perfect scores.

      Think about it.
    2. Re:WARNING!!! WARNING!!! by Anonymous Coward · · Score: 0

      The higher the foot size, the larger the foot. The larger the foot, the older you are. Presumably you should be able to spell better with age. Cheers.

    3. Re:WARNING!!! WARNING!!! by Anonvmous+Coward · · Score: 1

      That was better than my answer. I assumed bigger foot = taller person = less likely to rest his head on the desk to sleep.

      Oh well. Heh. Thanks!

    4. Re:WARNING!!! WARNING!!! by Anonymous Coward · · Score: 0

      Bigger foot implies bigger kid
      bigger kid implies older kid
      older kid implies better speller

    5. Re:WARNING!!! WARNING!!! by Anonymous Coward · · Score: 0

      you are thinking too hard.

      people with bigger feet are older

    6. Re:WARNING!!! WARNING!!! by Anonymous Coward · · Score: 0

      Maybe you should think about testing for skills and knowledge and drop the whole "magic question" approach. Even if your interviewee didn't learn the answer from the headhunter, who's to say he didn't learn it from an interviewer at another company, or from a classmate who interviewed with you last year?

      If you tested for skills, it wouldn't MATTER if they learned them from someone else. In fact, that would probably make you very happy.

      I realize that suggesting that you actually do your job and learn how to become a competent interviewer is a burdensome request, but in these difficult times we all have to sacrifice a bit.

    7. Re:WARNING!!! WARNING!!! by jentheking · · Score: 1

      I don't know... I wear a size 6 shoe and I know tons of younger kids that have bigger feet ;P Guess short people are in the minority.

    8. Re:WARNING!!! WARNING!!! by Anonymous Coward · · Score: 0
      Did anyone get the one about foot size and spelling bees???

      Dude, older people have larger feet, and generally spell better.

      Sheeeeit.

    9. Re:WARNING!!! WARNING!!! by Anonvmous+Coward · · Score: 1
      Maybe you should think about testing for skills and knowledge and drop the whole "magic question" approach. Even if your interviewee didn't learn the answer from the headhunter, who's to say he didn't learn it from an interviewer at another company, or from a classmate who interviewed with you last year?

      If you tested for skills, it wouldn't MATTER if they learned them from someone else. In fact, that would probably make you very happy.

      I realize that suggesting that you actually do your job and learn how to become a competent interviewer is a burdensome request, but in these difficult times we all have to sacrifice a bit.


      Why are you assuming we did nothing but ask 'magic question' questions? Heh. I dated this one girl (sorry to rub it in, pal) that made similar overreactive under-cooked accusations. "This color is pretty on me? Are you saying I'm a cow in other colors?!?!"

      Yep... acting like a bitch sure brings back memories. Heh. I have to admit, though, you did a wonderful impression of her. :)
    10. Re:WARNING!!! WARNING!!! by $beirdo · · Score: 1

      I don't care about interviewing!!! Who cares if these damn questions are used for testing people for jobs??? I want to know the damn answers!!! I am really curious!!! If you care more about the inteviewing process than about the answers to some really interesting, challenging questions, then you need to get a life!

      Not that I don't think that there is some merit in obscuring the answers to hard questions. But I can't figure out more than 50% of these and it is driving me INSANE! I THINK MY DAD'S GONE CAARRRAAAAZY!!!

    11. Re:WARNING!!! WARNING!!! by fruey · · Score: 1
      It's based on averages. So clearly the older you are, the bigger your feet are. By the time your feet stop growing, your spelling probably stops improving (on average, again).

      Readers who become big readers later in life may suddenly become better spellers. But they are unlikely to be part of that statistic.

      How is that not obvious? Are you one of those people always trying to find the "difficult" or "clever" answer to a simple question?

      --
      Conversion Rate Optimisation French / English consultant
    12. Re:WARNING!!! WARNING!!! by Anonymous Coward · · Score: 0

      FOOT SIZE is correllated to the person's AGE. A 18 yr old will kick the little booties off a 2 yr old in a spelling bee.

    13. Re:WARNING!!! WARNING!!! by Anonymous Coward · · Score: 0

      Okay, there's the older age/bigger foot issue (but how many adults do spelling bees?) :)

      But also, you can write more cheat notes on a bigger shoe. :)

    14. Re:WARNING!!! WARNING!!! by $beirdo · · Score: 1

      Thank you very much. Now I can sleep at night.

  20. I like to ask them... by tgibson · · Score: 1

    I like to ask candidates what "antsy" means. They always get that one wrong.

    Also, I like to ask them to name two adjectives that best describe me.
    -TAG

    1. Re:I like to ask them... by Anonymous Coward · · Score: 0

      "antsy" "bastard"

    2. Re:I like to ask them... by Anonymous Coward · · Score: 0

      "homosexual" "wanker"
      You're a moron, bastard.

    3. Re:I like to ask them... by Anonymous Coward · · Score: 0

      > I like to ask candidates what "antsy" means. They always get that one wrong.

      "nervous" or "figity", as in, "he was an antsy interviewee" ..what's the big deal about that?

    4. Re:I like to ask them... by Anonymous Coward · · Score: 0

      Probably because most technical interviewees would reply "American National Standards Institute (ANSI)"

  21. Theological Engineering by Anonymous Coward · · Score: 0

    Bob and Joe are standing on a street corner. God loves each an equal amount L.
    Bob then accelerates to .9c. In Joe's rest frame, how much does God now love Bob?

    -- Anonymous Coward because I already moderated this thread. Boo Hoo.

  22. I kind of like these, but... by David_R · · Score: 0, Troll

    I'm frustrated by the lack of concrete answers. That's probably the point, mind you -- give some insight on your working behind whatever answer you give.

    It seems for most of them, the best answer would be as many sensible answers as you can think of, without seeming like a complete goober -- you can be the whizziest math whiz in the world, but that's probably not worth jack at any job worth its salt if you're most backward social 'tard who doesn't know when to stop.

    Thank Jebus I have a nice job.

  23. Regarding my favourite riddle... by David_R · · Score: 1

    What's the most important piece of paper to get from the client?

    1. Re:Regarding my favourite riddle... by Anonymous Coward · · Score: 0

      The one with the dead president on it.

    2. Re:Regarding my favourite riddle... by Anonymous+Squonk · · Score: 1

      The one with Benjamin Franklin on it?

    3. Re:Regarding my favourite riddle... by Edmund+Blackadder · · Score: 2

      cheque

    4. Re:Regarding my favourite riddle... by Anonymous Coward · · Score: 0

      > What's the most important piece of paper to get from the client?

      The release from liability.

      More valuable than the check, as it lets you keep the check later..

    5. Re:Regarding my favourite riddle... by Anonymous Coward · · Score: 0

      What if it bounces? Cash only. And none of that funny stuff with the pictures of inbred welfare recipients on them like they have in Britain.

      Speaking of which, when I was in the Cayman Islands, a resident there complained about how ugly the CI currency was (they all have the Queen on them). I told him, "It won't get any better when the Queen dies and Charles becomes King."

  24. Weird entries in the Microsoft category... by Succa · · Score: 2

    The MS category has some real toughies, like:

    "y do u think u r smart"
    "y do u wanna work at Microsoft?"

    and a great catalyst for catastrophe...

    "If you could remove any of the 50 states, which state would it be and why?"

    These toughies are gonna keep me up all night!

    1. Re:Weird entries in the Microsoft category... by Anonymous Coward · · Score: 0

      Preferably with a few nukes.

    2. Re:Weird entries in the Microsoft category... by CyberBill · · Score: 1

      As a resident of Redmond, I disagree. :P

      --
      -Bill
    3. Re:Weird entries in the Microsoft category... by hazyshadeofwinter · · Score: 1

      > "y do u think u r smart"

      Well, *I* sure didn't write Windows.

      >"y do u wanna work at Microsoft?"

      I don't.

      >"If you could remove any of the 50 states, which state would it be and why?"

      Well, Redmond is in Washington...

      G'waaan, mod me down, if /. ain't counting my karma, neither am I.

      --
      Click here if you just like to click on shit.
    4. Re:Weird entries in the Microsoft category... by kuiken · · Score: 1

      Canada ! :P

      (just a joke ppl )

      --

      42
    5. Re:Weird entries in the Microsoft category... by esonik · · Score: 1

      Why that? You'd be an independent country and all MS tax would stay in the city.

    6. Re:Weird entries in the Microsoft category... by jtdubs · · Score: 2

      The correct answer of course:

      "Whatever state you are from... Ass..."

      Justin Dubs

    7. Re:Weird entries in the Microsoft category... by Anonymous Coward · · Score: 0

      The correct answer would be California, since it's going to disappear eventually anyway.

  25. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  26. google cache.. by neo8750 · · Score: 2, Informative
    here ya go

    Google Cahce is Ace

  27. I'm a moron by cdtoad · · Score: 1

    well guess I'm failing my next tech interview... either that or it's way to fricken late. I couldn't answer 1 of those dumb things...

    --
    when they ban enctryption only criminals wi$21*J *#JF$%!@#$':
    1. Re:I'm a moron by Sir+Tristam · · Score: 2
      I couldn't answer 1 of those dumb things...
      Yeah, I couldn't get one, either. Which was the one that was giving you problems?

      Chris Beckenbach

  28. A slashdotting isnt funny when it happens to me. by ptrahms · · Score: 1

    No wonder I had so much trouble accessing my own site. hey guys, think of the mudhoney fans (http://www.ocf.berkeley.edu/~ptn/mudhoney/) and leave the server alone.

  29. An Answer! by berck · · Score: 1

    Okay, after puzzling over it for some time I think I have it. Guy puts both condoms on and has sex with woman 1. He the takes the outside condom off and has sex with woman 2. The he flips the condom he'd taken off inside out, and puts it back on and has sex with woman 3.

    1. Re:An Answer! by Anonymous+Squonk · · Score: 2
      Okay, after puzzling over it for some time I think I have it. Guy puts both condoms on and has sex with woman 1. He the takes the outside condom off and has sex with woman 2. The he flips the condom he'd taken off inside out, and puts it back on and has sex with woman 3.
      Well, besides the fact that it's damned near impossible to put on a used condom inside out, and assuming he hasn't released any seminal fluid at all into it already, wouldn't he now be in contact with the fluids from engaging in sex with woman 1?
    2. Re:An Answer! by Anonymous Coward · · Score: 0

      No, as he has kept the inner condom on at all times.

    3. Re:An Answer! by Anonymous Coward · · Score: 0

      That is the correct answer. Which seems to be sufficient evidence that whoever thought of this riddle has never actually had sex. ;)

      There's all sorts of lovely combinations on this page...
      http://rec-puzzles.org/new/sol.pl/logic/c ondoms

    4. Re:An Answer! by gawi · · Score: 1

      That is the correct answer. Which seems to be sufficient evidence that whoever thought of this riddle has never actually had sex. ;)

      yeah... it was too unreal for me. Althought I thought about turning them inside out, I found this to be too risky to be considered safe. Instead, the riddle should have been written with a surgeon, 3 patients and 2 pairs of rubber gloves. But then again...

      --
      All humans are mortal. Socrates is a human. Socrates is dead.
    5. Re:An Answer! by Anonymous+Squonk · · Score: 1

      Hmmm...well, if you ask me, this question had to be written by a guy who's never actually used a condom during sex in his life.

    6. Re:An Answer! by Anonymous Coward · · Score: 0

      It not real life, just a riddle....

      On the other hand, if only I'd read this article before that stupid camel race with my brother.

    7. Re:An Answer! by sehryan · · Score: 2

      How can that be the correct answer? Fluids from the second woman are going to be on the outside of the condom, so when you flip it for the third, you now have the second's fluids "inside" the condom. That will work to keep her from getting pregnant, but doesn't do a damn against STDs. I hope some of you guys weren't actually using this method thinking it would work.

      --
      The world moves for love. It kneels before it in awe.
    8. Re:An Answer! by flamingmoose · · Score: 1

      As opposed to all the other riddles, who have a real life quality about them. Can't tell you how often I had to ask a guy which direction another guy would send me in order to prevent dozens of gnomes wearing red and blue hats from dying on an exploding bridge.

      --

      .sigs - is there anything they can't do?
    9. Re:An Answer! by shiafu · · Score: 1
      Fluids from the second woman are going to be on the outside of the condom, so when you flip it for the third, you now have the second's fluids "inside" the condom

      Actually, I think it does work.

      Woman 1: Guy wearing both condoms at once.
      Woman 2: Guy takes off condom #1, outside of condom #2 still clean.
      Woman 3:Guy puts back on condom #1, but inside out. The outside, which was previously the inside, is still clean, since it was only touching the outside of the 2nd condom with woman number 1, and the guy is protected from the dirty inside, which was previously the dirty "outside", since he still has the 2nd condom on. Basically, both "dirty" sides are now touching each other, but not in contact with any skin.

      Kind of silly to belabor this, and maybe it isn't exactly a safe practice in real life. But I think the solution is clever, nonetheless. :)

    10. Re:An Answer! by Anonymous Coward · · Score: 0

      lol!!!

    11. Re:An Answer! by Anonymous Coward · · Score: 0

      You must be kidding. If he has to wear two condoms at the same time he'll never finish fucking the first woman, let alone the second.

    12. Re:An Answer! by Anonymous Coward · · Score: 0

      The problem lies in that when the outer condom is flipped inside-out, the shit from inside the outside condom is transferred to the outside of the inside condom. The third woman gets the 1st woman's stuff.

    13. Re:An Answer! by Anonymous Coward · · Score: 0

      Strike that.. fscked up the order.

  30. You daft fools, it's a human being. by Anonymous Coward · · Score: 0

    *sigh*

  31. Release the EVIL by tRoll+with+Butter · · Score: 1

    If my next employment interview includes the question "Please come up with a mathematical formula to convert the ASCII value of your full name to 666", I'll QUIT before they hire me.

    --

    ---
    Siggy, siggy, siggy, can't you see? Sometimes your puns just irritate me.
    1. Re:Release the EVIL by Anonymous Coward · · Score: 0

      fun(name) :- return 666;

  32. Incense riddle by Anonymous+Squonk · · Score: 2, Interesting

    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?

    1. Re:Incense riddle by Anonymous Coward · · Score: 0
      Three sticks (60 min each)
      ----
      ----
      ----

      One snapped in half (30 min)
      --

      Snapped in half again (15 min)
      -

      60 + 30 15 = 1:45
      ---- + -- + - = 1:45
    2. Re:Incense riddle by Anonymous Coward · · Score: 0

      Uh, this is stupid. You sell the lighter and incense to a hippy, and buy a fucking watch?

      No? OK. Just snap a 1/4 of one stick off... It should burn in 45 minutes then...

      OK I give up. j00 0wn me

    3. Re:Incense riddle by Anonymous Coward · · Score: 2, Interesting

      Light the first stick at both ends, so it will consume itself in half
      an hour.

      At the same time, light the second stick at one end.

      When the first stick expires, the second stick will have half an hour
      left. But if you light it's other end at the same time the first
      stick expires, the second stick will expire in 15 minutes.

      When the second stick has expired, it will be 45 minutes from when you
      started, and you can just light the third stick at one end to get 1
      hour and 45 minutes.

    4. Re:Incense riddle by Anonymous Coward · · Score: 0

      You'll be off by whatever amount of finite time it will take to get your hand from one end of the stick to the other.

      Nice try. The correct answer was: buy a watch.

      Thanks for trying!

    5. Re:Incense riddle by Anonymous Coward · · Score: 0

      Sounds great except you have no way to hold the stick up unless you lay it down but then it won't stay lite for long so that can not be the correct answer

    6. Re:Incense riddle by Anonymous Coward · · Score: 0
      Sounds great except you have no way to hold the stick up unless you lay it down but then it won't stay lite for long so that can not be the correct answer
      naah, the same magic ingredient that allows it to burn completely in exactly one hour will allow it to stay lit laying down...
    7. Re:Incense riddle by Anonymous+Squonk · · Score: 2, Informative

      The original riddle comes from a Japanese TV show, and they used a katorisenkou, a mosquito releeant which is shaped like a spiral and burns lying down. But none of you would know what that is, so incense was the closest I could think of to that...

    8. Re:Incense riddle by Anonymous Coward · · Score: 0

      Take incense stick #1 and #2
      Burn one end of #1 and both ends of #2.

      When #2 burns out, stop burning #1. 30 min have passed, and #1 has 30 min left.

      Burn stick #3, when it finishes, 1.5 hrs have passed.

      Finish burning #1 on both ends (15 more min), when #1 finishes, 1 hr 45 min have passed.

    9. Re:Incense riddle by Anonymous Coward · · Score: 0

      Actually, there's a product in North America (and elsewhere, probably) called a mosquito coil. Here's a link.

    10. Re:Incense riddle by sapped · · Score: 1

      Light the first stick - this will burn for an hour.

      Snap the second stick in half - the first half will burn for 30 minutes.

      Snap the second half in half again - the first "quarter" will burn for 15 minutes.

      1 h + 30 m + 15m = viola!

    11. Re:Incense riddle by Anonymous Coward · · Score: 0

      there's also a product in north america called A CANDLE, look into it.

    12. Re:Incense riddle by Anonymous Coward · · Score: 0

      You probably don't know for sure that the sticks burn at the same rate throughout, but only that the entire time to consume the stick when burned from one end is one hour. If half of the stick burned in 1 minute and the rest of the stick took 59 minutes, then your method would not work.

  33. Re:A slashdotting isnt funny when it happens to me by baywulf · · Score: 1

    I still remember the OCF at Berkeley back in 1995. All they had were basically a half dozen donated Apollo Unix computers. And the access terminal were basically VT100 green screens.

  34. The question I remember most by Anonymous Coward · · Score: 0

    The interview question I remember most from a particular software company in the Seattle/Redmond area. "Name three functions in C STDIO that take three parameters"

  35. 100% OT: sales engineering positions? by Anonymous Coward · · Score: 0

    I'm just curious... what are "sales engineering positions"?

    1. Re:100% OT: sales engineering positions? by Latent+IT · · Score: 2

      I'd imagine it's the incredibly rare job held buy a guy who actually knows how to use what he's selling. =)

  36. Riddle by buck_wild · · Score: 3, Interesting

    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.
    1. Re:Riddle by DJayC · · Score: 2, Funny

      Nothing.. unless you're an atheist in which case your riddle isn't cross-platform ;-)

    2. Re:Riddle by Diclophis · · Score: 1

      That riddle was nothing ...

    3. Re:Riddle by Hous68 · · Score: 1

      Nothing.
      Nothing is greater than god. (heh)
      Nothing is more evil than the devil. (ooook)
      Poor people have nothing. (sure)
      Rich people want nothing. (if you say so)
      If you eat nothing, you'll die. (finally, truth.)

    4. Re:Riddle by wcspxyx · · Score: 3, Funny

      Oh, that's easy. Martha Stewart.

      --
      Sig? What sig? Do I have to have a sig!?!?
    5. Re:Riddle by Bob+The+Cowboy · · Score: 1
      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?


      That's easy. Windows.

      Note the ratio for Windows installs on PC's to people worshipping God

      Evil... well duh.

      Everyone and their mother has it, whether or not they could afford to buy it *wink, wink, nudge nudge*

      and if you were dumb enough to eat glass, well... no sympathy here.

      Bill.
    6. Re:Riddle by Anonymous Coward · · Score: 0

      The answer you're looking for is "Nothing."

      Although I can think of many exceptions.

    7. Re:Riddle by Trak · · Score: 1

      The answer is:

    8. Re:Riddle by Anonymous Coward · · Score: 0

      To the wankers saying the answer is nothing: no, a better answer is ASS.

      What is:
      Greater than god? ass.
      More evil than the devil? ass.
      Poor people have it? ass.
      Rich people want it? ass.
      If you eat it, you'll die? ass.

    9. Re:Riddle by Anonymous Coward · · Score: 0

      That's easy.
      A nickel.

    10. Re:Riddle by MrScience · · Score: 1

      Google knows! Neat riddle, btw.

      --

      You quitting proves that the karma kap worked. The most annoying of the whores shut up. --CmdrTaco

    11. Re:Riddle by buck_wild · · Score: 1

      That's a really good answer! Ok, I don't know about good, but it made me laugh.

      --
      If all you have is a hammer, everything looks like a nail.
  37. Why College is Required for a Programmer by Enonu · · Score: 3, Interesting

    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!

    1. Re:Why College is Required for a Programmer by Anonymous Coward · · Score: 0

      prof matar is an idiot

    2. Re:Why College is Required for a Programmer by jkorty · · Score: 1

      That takes 5 ops. It can be done in 4: A&B | (A|B)&C

    3. Re:Why College is Required for a Programmer by Cryptnotic · · Score: 2

      Dude. Why did you write out a Karnaugh map if you weren't going to reduce the expression? See that !B!C being 0 regardless of what A is? You can remove an operation. Watch:

      (A & (B | C)) | (B & C)

      Only 4 ops. Yours is 5.

      --
      My other first post is car post.
  38. Interviewing at Microsoft by shird · · Score: 2, Insightful

    This is a great site for more information on interviewing at Microsoft. It has some sample questions, study materials and testimonials etc.

    --
    I.O.U One Sig.
  39. That riddle is impossible! by Anonymous+Squonk · · Score: 2, Funny

    I thought for days about this riddle, but it is impossible! I give up! Nothing could be the answer to that!

  40. again, hiring managers don't get it by e40 · · Score: 2

    (and I'm a hiring manager)

    I rarely find that people fall down on the job because they lack intelligence, especially the kind it takes to solve these riddles. Many people don't use the intelligence they have because of laziness, bad habits, or can't communicate what they know. Most people are smart enough to hide this in interviews, too.

    The reason people can't do their jobs, 99% of the time, is they don't play well with others and/or have poor communication skills.

    Give me an above average, hard working, honest, good communicator over that prima donna MIT grad anyday. Don't get hung up on the MIT example, it could easily be Stanford, UC Berkeley, or whatever. The point is that institutions like these select for intelligence, and let's face it high intellegence and good communications skills rarely go hand in hand. It's a beautiful thing, though, when they do. (Lucky bastards!)

    1. Re:again, hiring managers don't get it by teamhasnoi · · Score: 2

      I AgrE intirelY. I am one ov those bestest talker-makers an sm4ertis brane uSer havEHrs. tAwker-makers an brane user makers are not in na mane ruums. Bobo go sleep now.

  41. Ripoff by burnsy · · Score: 1
    All this guy did was ripoff these from Chris Sells.

    Microsoft Interview Questions

  42. Maybe some Spoilers? by codewolf · · Score: 2

    Answers here (post more):
    Q: Coin in bottle

    A: Simply push the cork into the bottle and shake the coin out.

    --
    http://www.codewolf.com - Just good stuff to waste time
    1. Re:Maybe some Spoilers? by Tigris666 · · Score: 1

      Q: ARAB SHEIKH CAMELS

      A: The wise man told the brothers to jump on the other guys camel instead of their own. That way if you win the race, you win the money.

      --
      Kids, you tried your best and you failed miserably. The lesson is, never try. -- Homer J. Simpson
  43. Answer [spoiler] by Anonymous Coward · · Score: 0

    The answer, at least for those who believe in a god and those who believe that rich people aren't greedy for more, is "nothing."

  44. Re:A slashdotting isnt funny when it happens to me by Anonymous Coward · · Score: 0

    Isn't mudhoney a seattle band?

  45. You code is error free, huh? by Anonymous Coward · · Score: 0

    Go bitch about Windows bugs to Bugzilla. Oh, wait Mozilla IS A GIANT FUCKING BUG LIKE LINUX.

    1. Re:You code is error free, huh? by Anonymous Coward · · Score: 0

      Well, at least the bugs are not hidden.

  46. Re:Riddle - spolier warning... by WIAKywbfatw · · Score: 2

    Come on, I've never heard that one but the answer's got to be "nothing".

    I don't know what that says about the riddle, me or people who spend days thinking of the right answer but it's hardly a tough one is it?

    (My apologies if this comes across as smug and arrogant, it's not meant to be. At the very least this post provides those that weren't as instantly inspired as myself with the correct answer.)

    --

    "Accept that some days you are the pigeon, and some days you are the statue." - David Brent, Wernham Hogg
  47. Whoop whoop booyah biyatch 8====D by Anonymous Coward · · Score: 0

    This troll is so right.

    And don't use Mozilla no matter what version number. It causes users to lose the ability to spell

    And don't run linux no matter what distribution. It leads users into thinking they are superior.

    And Mac OS X is not UNIX you fuck monkeys

  48. Do you want some really hard problems? by mathematician · · Score: 1

    Try out some real hard math problems here.

    1. Re:Do you want some really hard problems? by Anonymous Coward · · Score: 0

      Try out some real hard math problems here [demon.co.uk].

      ...and if you're, ahem, having hard problems go here instead.

  49. whee this is better than games magazine by graveyhead · · Score: 2
    At a fork in the road between two cities, you see 2 people. One always tells the truth, and comes from the city of safety. The other person always lies and comes from the city of cannibals, where they will eat you. They both look exactly the same. You must ask them one and only one question (no compound questions either). What question could you ask to find out which path leads to the city of safety?

    Did they steal this from the Dr. Who "Pyramids of Mars" episode, or was it the other way 'round? Anyone know?

    Also, pretty sure I figured this one out, but have no college math, & would appreciate a more technical answer.

    You are standing at the start of an infinite sequence of quarters. Someone tells you that 20 of them are tails and the rest are heads. He says that if you can split the quarters into 2 piles where the number of tails quarters is the same in both piles then you win all of the quarters. You are allowed to move the quarters and to flip them over, but you can never tell what state a quarter currently is (i.e. you are blind and you cannot feel which side is heads and which side is tails). How do you partition the quarters?

    So, if you flip the first 20 coins, and partition between 20 and 21, you have the best chance for success, right? Doesn't that mean that there is a 20/inf. and therefore a 1/inf chance that one of the tails coins is in the first 20?

    --
    std::disclaimer<std::legalese> sig=new std::disclaimer; sig->dump(); delete sig;
    1. Re:whee this is better than games magazine by The+Dark · · Score: 2, Insightful

      It doesn't matter if there is a tail in the first 20, if there is then it becomes a head, so you end up with 19 tails in the first 20 and 19 tails in the next infinity.

      --
      sig's not here
    2. Re:whee this is better than games magazine by Anonymous Coward · · Score: 0

      It's much older than the Dr. Who story, and I don't think the formulation you quoted is the original, either. I don't know what is, but this one's been around forever.

    3. Re:whee this is better than games magazine by Anonymous Coward · · Score: 0

      At a fork in the road between two cities, you see 2 people. One always tells the truth, and comes from the city of safety. The other person always lies and comes from the city of cannibals, where they will eat you. They both look exactly the same. You must ask them one and only one question (no compound questions either). What question could you ask to find out which path leads to the city of safety?

      "How d'you like your women - boiled or roasted?"

      The cannibal, being a boiling man, will say, "roasted", and the other one will be so horrified at the idea of eating people that he'll tell you to get bent.

    4. Re:whee this is better than games magazine by Blakes+7 · · Score: 1

      Just flip all of them over into two separate piles. There's a one-to-one correspondence, then, between the number of tails in both piles (it's infinite, ya know :-).

  50. Real Microsoft Interviews by yotaku · · Score: 1

    When I saw this post, I was all excited. I thought I was going to see a bunch of questions like the ones I got at my microsoft interviews.

    First, I was a little surprised when they wern't all cs riddles. I guess I'd been a little hasty, slashdot isn't a programming site. I saw the link marked Microsoft, .. "Oh Goodie!". But I guess these are the questions that the non-programmers get. =/

    So I headed over to the CS riddles. Started reading over them.. "Too easy"... "Done"... "yeah, yeah, easy".. Except for a couple that he doesn't have the solution to, so who knows if they are really possible.

    So I think about trying to post the riddles I got here. But really most of them are interactive, and you can't really put them up all at once without giving it away. Things like, given this kind of data, sort it. Now optimize the space needed. ... down to using a single bit for each element. Now use half that memory. Now a quarter. Yeah, it was great fun. I really enjoyed their interviews. Didn't take the job tho... turned those suckers down =P

    One for the road:

    You have a list of numbers. You have to find the largest sum of a continious subset of those numbers.

    Example:
    1 -3 1 4 -2 4 -6
    answer would be 7

    in O(n) time, constant space. .. but just telling you that makes it much easier.

  51. Common Interview Question: by wirefarm · · Score: 5, Funny

    "What will it say in the newspaper about you when you die? In effect, write your own obituary:"

    All-time best answer:
    "Gunman shoots nine, then self."

    My friens Marc *swears* he said this in an interview.

    Cheers,
    Jim in Tokyo

    --
    -- My Weblog.
    1. Re:Common Interview Question: by Billly+Gates · · Score: 2

      lol.

      I would mod you up if I havent posted here already.

    2. Re:Common Interview Question: by Sheridan · · Score: 4, Funny
      (this isn't one of mine - its a variant on a .sig either here or on usenet soemwhere):-

      "Where did he get the plutonium?"

    3. Re:Common Interview Question: by Anonymous Coward · · Score: 0

      How about: "Gunman shot HR guy and his secretary for not getting a job."

    4. Re:Common Interview Question: by leob · · Score: 2
      "What will it say in the newspaper about you when you die? In effect, write your own obituary:"

      I'd prefer The world's oldest man dies in his sleep.

    5. Re:Common Interview Question: by RFC959 · · Score: 1

      No, no, no...
      "World's Oldest Man Killed By Jealous Husband"

  52. You may laugh... by LoztInSpace · · Score: 1

    I'd mark up someone who suggested using a standard routine to do a task rather than some home grown version. In fact our C++ test includes some of the usual stupid new/delete/off by one type memory stuff. I award full marks for suggesting the whole lot is replaced with a string even if they don't pick up on the individual mistakes. My favourite question: What makes good software. Best answer: Software that does what the customer wants. Anything else is a bonus.

  53. you forgot the end by Edmund+Blackadder · · Score: 2

    older than this riddle

  54. IQish by Anonymous Coward · · Score: 0

    Similar to an IQ test.

  55. Flashback! by JabberWokky · · Score: 2
    For some reason this made me flashback to my childhood and the quite excellent (for the agr group they are aimed at) Childcraft books from the publishers of the World Book Encyclopedia. I read all of those until I knew them back and forth, and then read the encyclopedia the same way. One of them was full of riddles, and some of the wording of several of these riddles seems to be the exact same.

    --
    Evan

    --
    "$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
  56. Microsoft interview questions by MillionthMonkey · · Score: 5, Funny

    You have a monopoly in a given market. A company creates a groundbreaking product and establishes a new, completely different market. Assuming you cannot buy the company, how do you smash it and extend your monopoly in the old market to the new one?

    How would you go about designing an email client that executes any code that is sent to it?

    If you could remove any of the fifty states (thus rendering federal antitrust statutes inapplicable to corporations in that state) which state would you remove and why?

    How would you go about designing an operating system for people who hate computers and who just want to use their machines for pay-per-view entertainment?

    An End User License Agreement (EULA) appears in a window with "I Agree" and "I Disagree" buttons. The text area in which the EULA appears is eighty columns wide. How many lines of text can be included in the EULA before a computer that just meets your system requirements is unable to load it into memory?

    At a fork in the road between two cities, you see 2 people. One always tells the truth, and comes from the city of safety. The other person always lies and comes from the city of cannibals, where they will eat you. Which one do you hire to write up licensing agreements for your legal department?

    An Arab sheikh is old and must will his fortune to one of his two sons. He makes a proposition. His two sons will use their computers, and whichever computer gets a blue screen of death first will win the fortune for its owner. During the race, the two brothers do nothing on their computers, neither willing to risk a blue screen of death. In desperation, they ask a wise man for advice. He tells them something; then the brothers immediately jump onto the computers and start installing new hardware, sharing files, and downloading hastily written security updates. What did the wise man say?

    1. Re:Microsoft interview questions by ch-chuck · · Score: 2, Insightful

      Man, that's great. But isn't this backwards:

      "whichever computer gets a blue screen of death first will win the fortune for its owner."

      To work, shouldn't it be "whichever computer gets a BSOD first will lose the fortune for it's owner." ??

      --
      try { do() || do_not(); } catch (JediException err) { yoda(err); }
  57. Spoiler: 100 prisoners and a light bulb by Anonymous Coward · · Score: 2, Insightful

    This was a nifty riddle, I never saw it before, and I do think it's appropriate for the programming mind set.

    Essentially the prisoners have to come up with some programs for themselves. They become little finite state machines with an unlimited number of internal states, one input bit, and one output bit. Then the jailer picks one prisoner at a time, randomly, and lets the prisoner run his state machine.

    First I noticed that there aren't enough different truth tables for 100 prisoners, which led me to think about the state machines.

    Then I looked around for some kind of protocol where prisoner #1 could signal that he had rendez-voused with the lightbulb, and then hand off a notional "token" to prisoner #2, and so on for 100 prisoners, eventually to make a token ring. That wasn't working out very well. I got up to 4 prisoners that way, and I wasn't coming up with a general mechanism.

    Then I thought: okay, try client-server, make one prisoner the "boss" with one program, and 99 other prisoners are "drones" with a second program.

    That worked out pretty well!

    The next problem is communicating the strategy to the prisoners:

    "Okay, all you mugs, listen to me, because I was a smart guy on the outside!"

    "You, KILLER, you are the BOSS. It's your job to keep the count. Whenever you go in that room -- if the lamp is on, you turn it off, and you make another tally mark on your roster. If the lamp is off, you leave it off. When you get to 99 tally marks, you tell the warden that everyone's been in there, and we can all go".

    "All the rest of you joes, listen up. If you go in the room, and the lamp is off, you turn it on -- but ONLY ONCE. JUST ONCE. After you do that, you never touch the lamp again. Ever. I don't care how many times you go in the room."

    "All you joes -- if the lamp is already on, don't touch it. Leave it on. That just means that someone else turned it on and Killer here hasn't seen it yet. If the lamp is off, and you touched it before, leave it the hell off! Cause if you turn it on again, Killer's count is gonna get messed up, and we're all going to die."

    "Killer, you got pencil and paper? Good. Maybe you want to tell Numbers here to do the counting instead? It doesn't matter who does it, as long as we all agree RIGHT NOW who's going to keep the count. Because if you blow the count -- either we are going to be waiting here forever, or you are going to pipe to the warden too soon and we'll all fry."

    "Any questions?"

    (One of my buddies has to be pre-arranged to ask this): "Yeah! What if I go in the room and the light's already on? What do I do?"

    "Answer: you do nothing! You turn around and walk out! If you haven't turned on the light for yourself yet -- this doesn't count."

    Q: What if I turned on the light and the jailer calls me back and it's still on?

    A: "Same as above ... you do nothing! You turn around and walk out! Look at it this way. All you joes are never going to turn the lamp off. Ever. That's Number's job. And each of you joes are going to turn on a dark lamp and make it bright exactly ONCE in your life. Just ONCE. No more, no less. If you can count up to 1, you can do this. Numbers has to count to 100, and I know he can handle that. And we'll all be out of here eventually."

    Then we train the guys using a couple of decks of playing cards, and a lamp, so they can see how it works.

    1. Re:Spoiler: 100 prisoners and a light bulb by Ratface · · Score: 1

      Nice one! I was searching around on Google for an answer to that one and I couldn't find anything. Thanks for making it so atmospheric too ;-)

      --

      A little planning goes a long way...
    2. Re:Spoiler: 100 prisoners and a light bulb by Jhan · · Score: 2, Informative

      Unfortunately, Numbers will only be able to increase his tally by one, each time he's picked (less actually, since after a while there will be a high probability that no 'untallied' prisoner has been in the room since he was last there).

      If Numbers is called on the average every 100 days, and can increase the tally by one each time, the procedure will take a bit less than 30 years!

      Not that my solution is much better:

      The prisoners make up their own calendar, in which every month has 100 days. Each prisoner is also assigned a number (1-100).

      Now, if a prisoner is called on day N of the 'month', turning the light on is a signal to next guy that he knows for sure that prisoner number N has been in the room. Turning the light off is a signal that he doesn't have a clue about prisoner N.

      If a prisoner is called on day N and sees a light, he makes a note that guy number N-1 has been in the room. The first prisoner that has all 100 checked can get the lot sprung.

      Initially, each prisoner can only be sure of himself, so things will not start moving until by chance a prisoner is called on his own day. This should happen several times during the first month though. Knowledge of who has been in the room will then slowly spread among the prisoners.

      The process won't complete until (some time after) every prisoner has been called on his day at least once. I tried to calculate how long that would be but my math isn't up to it. Probably some decades :-(

      --

      I choose to remain celibate, like my father and his father before him.

    3. Re:Spoiler: 100 prisoners and a light bulb by Anonymous Coward · · Score: 0

      That is true, my original solution will take a long time. The following events have to happen:

      unique drone called
      Numbers called
      unique drone called
      Numbers called ... 99th unique drone called Numbers called

      So Numbers has to be called 99 times. The running time is even longer, because all those unique drones have to be called. Exercise: if N unique drones have been called, work out the average time it takes to call a unique drone plus the time it takes to call Numbers.

      I am skeptical of your solution. Each prisoner can learn that prisoner N-1 has been in the room. How does any prisoner N learn that prisoner N-2, N-3, N-4 have been in the room? Tell me what happens if they are called in the order: 1, 2, 67, 4, 33. What does #67 see on day 3 (lamp on or off), and what information does he learn? What about #33 on day 5?

      For an interview question, I would give the candidate about 6 questions like this and a quiet room to work in (like an empty office that our actual engineers work in). I would give them several hours to research all the questions. They could bring their own laptop to the interview, and I would actually give them an Internet connection, but I would make it clear that I was logging their traffic (so if they are reading up on algorithms on Google, okay, but if they are just e-mailing the questions to Donald Knuth, I am not hiring them).

      Then after 4 hours or so of research, the interviewee stands up in front of my programming group and gives a whiteboard talk on the problems that they have solved or made progress on. And we ask them questions about the running time, the failure modes of their algorithms, and so on.

      That's how I would like to run technical interviews.

    4. Re:Spoiler: 100 prisoners and a light bulb by ASeed · · Score: 1

      I am skeptical of your solution. Each prisoner can learn that prisoner N-1 has been in the room. How does any prisoner N learn that prisoner N-2, N-3, N-4 have been in the room? Tell me what happens if they are called in the order: 1, 2, 67, 4, 33. What does #67 see on day 3 (lamp on or off), and what information does he learn? What about #33 on day 5?

      #67 sees lamp ON because #2 knows that #2 (himself) was in the room, so #67 marks #2 in his own calendar and turns the light OFF, because he doesn't know about #3...

      Similar with #33 on day 5, he sees the lamp ON, marks #4 and turns it off...

      I would add that if N-1 is not valid for #1 if the numbers are from 1 to 100... so the numbers must go from 0 to 99 and you use a "mod 100" algebra (99+1=0, 0-1=99)

      --

      --
      ACid
    5. Re:Spoiler: 100 prisoners and a light bulb by Anonymous Coward · · Score: 0

      Aha, I see the point. In the next month the warden might pick the order: 1, 67, 3, 33. In that month, prisoner #67 would learn that prisoner #1 had visited the room, and prisoner #33 would learn that prisoner #3 had visited the room.

      Thanks!

    6. Re:Spoiler: 100 prisoners and a light bulb by ASeed · · Score: 1

      Aha, I see the point. In the next month the warden might pick the order: 1, 67, 3, 33. In that month, prisoner #67 would learn that prisoner #1 had visited the room, and prisoner #33 would learn that prisoner #3 had visited the room.

      And the best part is that #3 would learn that #2 had visited room!!
      And If he happens to be chosen in the day 2 of their calendar, he would transmit its knowledge to the next one...

      So there are 3 people than can transmit about #2: #2 (himself), #67 and #3

      --

      --
      ACid
  58. Here's the riddle I wish Microsoft would use... by JamieF · · Score: 5, Funny

    "So there's a programmer writing some code, in C. That programmer needs to use a buffer to store some data. How does the programmer write the code such that an unexpectedly large amount of data doesn't overwrite the stack and result in a remote root exploit?"

  59. I know the answer! by benwaggoner · · Score: 5, Funny

    Because the holes are round.

    I mean, really, any other shape wouldn't fit...

    *ducking*

    1. Re:I know the answer! by BarefootClown · · Score: 2

      Honestly, this answer would probably get an applicant hired, in my book. I consider a good sense of humor to be critical in any job that involves working with other people (hint: almost every job). If he has a sense of humor, odds are he'll get along with other members of his team, and I'd rather have a good (but not great) programmer who gets along with everybody and contributes to a low-stress work environment than a great programmer who's an ass. Just my two cents.

      --

      "Make it ten--I am only a poor corrupt official."
      --Captain Louis Renault (Claude Rains), Casablanca

    2. Re:I know the answer! by lhand · · Score: 1

      I once got a job at a bank because when they asked if I knew anything about accounting. I answered "debits to the window, credits to the door." It's the punch line to an accounting joke I happened to remember; they laughed and I was hired.

      Yea, humor is important.

    3. Re:I know the answer! by Mind+Socket · · Score: 1

      Nah, it's because the men that use them are usually round.

  60. 100 Prisoners and a Light Bulb by Dan+Crash · · Score: 3, Insightful
    Well, I came up with a solution, but somehow it just seems inelegant to me. Any other solutions out there?
    100 prisoners in solitary cells. There's a central living room with one light bulb; the bulb is initially off. Everyday, the warden picks a prisoner at random, and that prisoner goes to the central living room. While there, the prisoner can toggle the bulb if he or she wishes. Also, the prisoner has the option of asserting the claim that all 100 prisoners have been to the living room. If this assertion is false (that is, some prisoners still haven't been to the living room), all 100 prisoners will be shot for their stupidity. However, if it is indeed true, all prisoners are set free and inducted into MENSA, since the world can always use more smart people. Thus, the assertion should only be made if the prisoner is 100% certain of its validity. The prisoners are allowed to get together one night, to discuss a plan. What plan should they agree on, so that eventually, someone will make a correct assertion?
    * SPOILER *

    .

    * SPOILER *

    .

    * SPOILER *

    .

    * SPOILER *

    The rule is: Turn on the light if it's off, unless you've already done this once, in which case, do nothing.

    The day all 100 of you meet, designate one person to turn off the light. Have them count each light they turn off. When they reach 100, they will know everyone else has been out already, and can safely demand their freedom.

    (Of course, assuming the warden really does pick someone at random, he could pick the same person every day, forever. Or not pick one person, every day, forever. Either way, there's no guarantee you're ever getting out.)

    --
    He who refuses to do arithmetic is doomed to talk nonsense.
    1. Re:100 Prisoners and a Light Bulb by Anonymous Coward · · Score: 0

      I was thinking about something along the following lines:

      1 - Give everyone a number, 00 to 99
      2 - (Rule part 1)If, when you are in the cell, the last 2 digits of the number of days the process has been going is equal to your number, switch the light on, otherwise leave it off.
      3 - If the light was on when you came in, add the number of days the process has been going to a list. Everybody keeps a list of the numbers that they know have come up already
      4 - (Rule part 2) You also switch the light on if one of the numbers in your list is equal to the last 2 digits of the number of days the process has been going.

      And when one of those lists is 99 long, they ask to be released.

      I would suggest that the second part of the rule would really accellerate the process once things got going, but I haven't the time (or the stats, come to think of it) to figure out which is best.

    2. Re:100 Prisoners and a Light Bulb by Anonymous Coward · · Score: 0

      Sorry, add the number of days the process has been going MIMUS ONE to the list. So you know the number of the person that was in there before. You know what I mean.

    3. Re:100 Prisoners and a Light Bulb by CProgrammer98 · · Score: 2

      A better solution is for each prisoner to just toggle the switch if this is the first visit, else leave it alone. Everyone can then count the state changes. As soon as the 100th guy changes the state, they ALL know it's gettin-out time. No need for a "master controller"

      With the "master" counter, you'd have to wait for him to be picked again so he could state that they'd all visited.

      --
      And the people shall be oppressed, every one by another, and every one by his neighbour Isaiah 3:5
    4. Re:100 Prisoners and a Light Bulb by jazman · · Score: 1

      My solution runs in 100 day cycles. The light indicates if someone has been in twice in one cycle. If you go in the room for the first time in that cycle, do nothing. If you go in the second or more, switch the light on if it is off (it shouldn't be off if this is time3+ as it will still be on from your time2). Whoever goes in on the 100th day knows if the light bulb is still off that everyone has been in once only, and declares freedom. If the light bulb is on, someone has been in at least twice, so at least one person hasn't been in yet.

      Assumptions: the prisoners can count, the warden keeps a list of who's been in, the prisoners can't see the light and can't communicate with each other except on the meeting day and through the bulb, and of course that the bulb is maintained, or at least is operated by a toggle switch.

      This is guaranteed to work the first time the warden lets everyone in the room in a cycle, and will continue as long as the warden duplicates people. But release was always dependent on the warden anyway. This is also tolerant of the possibility that the warden knows the plans. The idea of giving each person a number wouldn't get people out in minimum time as the warden could pick P2, P1, P4, P3, P6*, P5... on days 1,2,3,4,5,6 - this way everyone gets in but nobody gets in on their numbered day and the system fails. My way it doesn't matter what order people are picked in. (* NaN, a free man)

      The only thing that bothers me about this is that it would seem to be possible to shorten it further by determining at what point the warden stopped duplicating people. e.g. can freedom be declared on day 106 at the end of the sequence 1, 2, 1, 2, 1, 2, (stop duplicating here), 1, 2, 3, 4, 5, 6...; with my system it can only be determined on day 200 at the end of the sequence 1, 2, 1, 2, 1, 2, 1, 2, 3, 4...99, 100, 1, 2,...95, 96. But if anyone switches the light off for any reason in a cycle then whoever is picked on day 100 and finds the light off will not know if the light has been on. Of course if he does know if the light has been on that changes the parameters, but one of my assumptions is that solitary confinement means precisely that - no communication of any type with the outside world (with the possible exception of the warden at meal and bog times).

    5. Re:100 Prisoners and a Light Bulb by lowy · · Score: 1
      I have a different solution to the 100 Prisoners and a Lightbulb problem:

      At the meeting the prisoners each get assigned a unique number Px where x=0-99. Prisoners carefully count the number of days since the meeting. On any given day, let n be [(number of days since meeting) MOD 100]. Each prisoner simply follows the rule that he turns/leaves the light on iff he knows for certain that every prisoner up to including P(n) has been to living room.
      How does he know? Three ways:

      1. It is day 1 and he is Prisoner 1 (trivial).
      2. he has noted the information previously. For example, prisoner 86 might have previously entered on day 32 and noticed the light on. He knows, therefore, that prisoners 0-31 have all been there. He can safely turn on light on any day up to including day 31.
      3. It is his (that prisoners')day (i.e. n=x) AND the light was on when he came in. This last case is, of course, progress, as it allows him to signal to the following prisoner that everyone up to himself has been there.

      So word will slowly get out that Prisoner 1 then 2 then 3 and so have been there till prisoner 99 finally arrives on day 99 and sees the light! He can then safely make the assertion that "We have all been here before!".

      The question remaining, is "what the expected number of days for each of these solutions"?

    6. Re:100 Prisoners and a Light Bulb by Dan+Crash · · Score: 2
      Your solution seems to be essentially the same one proposed by an A.C. here with one difference. Tell me if I misunderstand anything.

      In both systems:
      1. Everyone is assigned a number from 0 - 99.

      2. Everyone keeps track of the days since the meeting.

      3. You turn on the light when the last two digits of the day you are chosen match your own ID #.

      4. You observe whether the light is off or on when you enter the room, and infer the ID # of whoever was last in the room if the light was on.

      5. You make a list which records all IDs which you know have entered the room.

      6. If it is your turn, you may turn on the light if the last two digits of the day are the same as an ID on your list.
      Where your solution differs is that instead of relying on the length of the lists made by each prisoner to determine the Freedom Date, you rely on cooperation between prisoners to create an unbroken string of lit-bulb days that lasts for 100 days, telling anyone chosen that day that they may demand their freedom.

      My own hunch is that it's more likely that someone will achieve a full list of all IDs first, since ID info propagates laterally while the lights have to propagate hierarchically. (As your solution is stated, someone who had a list of all 100 IDs but was only number 44 in the chain couldn't claim freedom for everyone.)

      The obvious solution is to use both methods -- anyone can demand freedom if:

      a) their list includes all ID numbers, or;
      b) they enter the room on day 99 and the light is on.

      I said my hunch was the lists would be faster because it's only a hunch. Since all these solutions rely on random data, the only way to say one is faster than another is on average. It would be cool to write some code for each one of these solutions and have a Bulb-Off: Run each solution program for X iterations and see which ones come out with the lowest average amount of days spent in prison!

      I might try that in the next couple of days. If you write some code for your solution, post a link to the source and the results here.

      --
      He who refuses to do arithmetic is doomed to talk nonsense.
    7. Re:100 Prisoners and a Light Bulb by twd20 · · Score: 1
      The best solution so far is the one where only one prisoner can turn the light on and everybody else turns it off just once. That should take a few over 100 visits from the special prisoner = ~10000 days.

      The solutions that require a prisoner to arrive on a day that equals their number (mod 100) are going to take a lot longer (since each prisoner will have to wait ~10000 days for this event to occur).

      The best solution I can think of goes as follows:

      Each prisoner has a value which starts at 1 with the exception that one prisoner is given value 29 to start with.

      Each day has a value which is always 2^n for some n>=0 (some suggestions for the rule giving a day's value are at the end).

      The algorithm has three steps when a prisoner arrives in the room:

      1) If the light bulb is on when a prisoner arrives, they add the value for the previous day to their own, otherwise their value is unchanged.

      2) If they now have value 128, they announce.

      3) If their new worth expressed in binary anded with that day's worth != 0 they make sure the light is on when they leave and they subtract that day's worth from their own.

      (If you think of this as the lightbulb having a value when it's on, there's a conservation of total value).

      Why the algorithm works:

      Units of 2^n in value are never broken up, but pairs of 2^n values can be combined to give 2^(n+1). Given a good choice for determining the day's value from it's number, this combining can proceed quite rapidly, in particular, if the first hundred days have day value = 1, then all prisoners who make at least one visit to the room during those days end up with either value = 0 or value = 2.

      Suggestions on the day value formula:

      suggestion 1:

      days 1-100 have value 1

      days 101 - 200 have value 2

      days 201 - 300 have value 4

      ...

      days 601 - 700 have value 64

      repeat.

      suggestion 2:

      Compute the the evolution of the expected density of powers of 2 present in the population of prisoners. Draw from this expected distribution using a pseudo-random number generator (although mabye this might require a bit too much brain power on the part of the convicted felons...).

    8. Re:100 Prisoners and a Light Bulb by Dan+Crash · · Score: 2

      Wow! Thanks for the analysis.

      I just finished writing up the code to see how many days it would take for my Master Counter solution to work, and on average it takes between 9,000 to 11,000 days, just as you pointed out. That's approx. 25 - 30 years, though! Ouch. Not as great as I'd hoped.

      I'll work on coding yours in when I get a chance to see how it compares.

      --
      He who refuses to do arithmetic is doomed to talk nonsense.
    9. Re:100 Prisoners and a Light Bulb by twd20 · · Score: 1

      I coded up my method and with my original suggestion for assigning the day value, I got 10752 days on average (no improvement :-( ).

      When I extended the run length to 500 days(*), I brought the average time down to 5886 days (only a factor of 2 improvement).

      I wonder if there's a better formula for assigning the day value...?

      (*) ie days 1-500 had value 1, days 501-1000 had value 2 etc.

    10. Re:100 Prisoners and a Light Bulb by lowy · · Score: 1

      Yeah, you are correct. I didn't read his post before submitting mine.

      Last night I wrote some (rough) C code simulating my method. It took something like 500 million days! If I have time I'll try the list method and the other methods mentioned in some of the recent posts that are much much more efficient, and also clean up the code and post it.

      I suspect that some of the better ideas will actually get the prisoners out before one of them dies (which could kill them all!).

    11. Re:100 Prisoners and a Light Bulb by anothername · · Score: 1

      I had basically the same idea yesterday, and created a script to test it. I believe it worked the same as yours, except I picked the lengths more carefully, using some math (but with simplifying assumptions so they're not optimal).

      I used the following lengths:
      Day value 1 for 800 days, 2 for 731 days, 4 for 666 days, 8 for 604 days, 16 for 549 days, 32 for 480 days, 64 for 411 days, 1 for 550 days, 2 for 480 days, 4 for 411 days and each length 411 days after that.

      Simulation showed the average number of days required was around 4630.

  61. My random crappy question: by Latent+IT · · Score: 2

    You're a racecar driver on a one mile track. You drive one lap, averaging 30 mph. How fast do you have to average on the second lap to get a total average speed of 60 mph over the two combined laps?

    1. Re:My random crappy question: by One+Louder · · Score: 1

      Too late - you've used up all the time in the first lap.

    2. Re:My random crappy question: by Anonymous Coward · · Score: 0

      90 mph

    3. Re:My random crappy question: by Latent+IT · · Score: 2

      Bingo. Have a cookie. =)

    4. Re:My random crappy question: by dylan_- · · Score: 2

      I don't get this? Used up all what time? There was no time limit mentioned...or am I just being thick?

      ps. That daft Vanishing Dollar riddle shouldn't have been in the "hard" section...

      --
      Igor Presnyakov stole my hat
    5. Re:My random crappy question: by hconnellan · · Score: 1

      No, you are thick mate.

      Time taken to lap a 1 mile track at 30mph = 2 mins.

      If you want to average 60mph over 2 laps then you would need to complete the 2 laps in 2 mins, but because you have already been driving for 2 mins you would need to complete the second lap in 0 seconds (impossible).

    6. Re:My random crappy question: by dylan_- · · Score: 2


      Doh! Yup, I'm thick (today, at least ;-))

      --
      Igor Presnyakov stole my hat
  62. some selected answers: by SlugLord · · Score: 4, Informative

    Some answers from the hard section:

    Criminal cupbearers:
    Let's assume we only have 10 prisoners and that they each drink from up to 512 bottles. Number the bottles from 0 to 999. Prisoner 9 samples 0 to 511. Prisoner 8 samples 0 to 255 and 512 to 999. Prisoner 7 samples 0 to 127, 256 to 383, 512 to 639, etc. (prisoners alternating between sampling and not sampling blocks of wine in decreasing powers of 2 -- prisoner 0 drinks from every other bottle) Now line up the prisoners after onen month and treat corpses as ones and living prisoners as zeros and you have your answer in binary.

    Mysterious Triangle area
    Well, to make a long story short, they're not triangles.

    100 Prisoners and a Lightbulb
    Well if we assume they can all see the bulb every day, they can just toggle the bulb iff this is the first time they've been selected. If the last prisoner has counted the number of times the bulb has been toggled, he can assert that he is the last one to be selected.

    Square Formation
    Move the "notched" piece to teh righth of the current larger square and put the small square piece in the notch. put the larger of the triangular pieces at the top, horizontal edge of the new formation.

    Calendar Cubes
    I like this one. You need all the numbers from 0 through 9 plus 0 through 3. That's 14 faces. You will never need 00 though, so you can remove one of the 0s. Also, you will only ever need the 3 with 0 or 1, so you can remove it from one of the blocks. The solution: the numbers 1-6 on one block, and 7-9 and 0-2 on the other. Yeah it works.

    Mystery Matrix
    4. Entry from row plus Entry from row 2 plus 1 mod 10.

    Fork in the road I
    "is that the city you come from?" If the response is yes, go there, otherwise turn away.

    Fork in the road II
    Assume each person is standing on his respective road. "Is one of you a liar?" Yes means he's a truth teller, no means he's a liar.

    Egg Dropping
    18. Drop from the 10th, 20th, 30th, etc. After it breaks, go back 9 floors and start dropping every floor. You use 18 drops if it can drop from the 98th or 99th floors.

    Greedy Pirates
    It's not apparent to me that this is the intended answer, but "Throw pirates 3 and 4 overboard and divide up the rest between 1,2, and 5. Pirates 1 and 2 will agree to the largest share, and pirate 5 always has a say after that, since 3 and 4 can't agree to anything, so he's needed for the majority.

    Hmm, well it's getting late so I'll just do one more:
    Card Game
    Bob takes any card over 9. The probability that none will show up is roughly .2 with an average payoff of $5. That means that the probability of getting a face card is .8 with a payoff of 11.5. Using more precise figures, i.e. not .2 and .8, the average payoff is about 10.0857 (706/70)

    1. Re:some selected answers: by kwishot · · Score: 1

      The 6 can also be a 9

      0 1 2 3 4 5
      0 1 2 6 7 8

    2. Re:some selected answers: by Anonymous Coward · · Score: 0

      you can do the egg one in less than that. your solution of 10,20,30 should immediately look wrong to you - why should 10,20,30 be special, why not 20,40,60 etc? now find the best case. I think can be done in 11?

    3. Re:some selected answers: by CProgrammer98 · · Score: 1

      Egg drop solution is interesting, but what about the potenial damage done to the egg - say it survives the first five drops, but breaks on the 60th floor. What if that egg would survive a first drop from the 60th, but not a fifth?

      Anyway, we all know that eggs don't survive a drop of a couple of feet! (at least not onto my kitchen floor anyway)

      --
      And the people shall be oppressed, every one by another, and every one by his neighbour Isaiah 3:5
    4. Re:some selected answers: by jsse · · Score: 2

      Fork in the road II
      Assume each person is standing on his respective road. "Is one of you a liar?" Yes means he's a truth teller, no means he's a liar.


      This is not the standard answer, but it's logically correct. How smart you are.

      The standard answer is, the man ask one of the boy "If I asked the other boy which road is leading to village A, what will he answer?" Any of them will point you to the wrong road.

    5. Re:some selected answers: by yason · · Score: 2, Interesting
      Calendar Cubes
      I like this one. You need all the numbers from 0 through 9 plus 0 through 3. That's 14 faces. You will never need 00 though, so you can remove one of the 0s. Also, you will only ever need the 3 with 0 or 1, so you can remove it from one of the blocks. The solution: the numbers 1-6 on one block, and 7-9 and 0-2 on the other. Yeah it works.

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

    6. Re:some selected answers: by Anonymous Coward · · Score: 0

      In the 100 prisoner - lightbulb one I'm fairly sure you cannot assume that they can all see the lightbulb.

    7. Re:some selected answers: by lowtekneq · · Score: 1

      The 2 comdoms and three ladies.. The man wears two the first time, then for the second he takes off the top one, and for the last he flips the one from the first time inside out, and becomes a very lucky man.

      How do you make a little program that checks for palendromes... (there is a smart and dumb way to do this). Smart way, get rid of spaces, OR values (of first to last, second to second last, ect) and then compare them.

      --
      Carpe meam simiam!
    8. Re:some selected answers: by Anonymous Coward · · Score: 0

      Could you explain the Mysteriuos Triangle Area one a bit more? I don't quite understand. Thanks.

    9. Re:some selected answers: by epsalon · · Score: 2

      Your solution to the egg dropping problem is wrong. Check out my riddles site for a correct solution (and a few extra riddles).

    10. Re:some selected answers: by Aliks · · Score: 1

      Another standard answer is:

      What would you have said yesterday if i'd asked you the way to freedom?

    11. Re:some selected answers: by SablKnight · · Score: 1

      Calendar Cubes
      I like this one. You need all the numbers from 0 through 9 plus 0 through 3. That's 14 faces. You will never need 00 though, so you can remove one of the 0s. Also, you will only ever need the 3 with 0 or 1, so you can remove it from one of the blocks. The solution: the numbers 1-6 on one block, and 7-9 and 0-2 on the other. Yeah it works.


      Unfortunately, it doesn't. 07, 08, 09 can't be shown -- 0 has to be on both cubes. The trick is that 9 and 6 can be represented by the same character.

      Greedy Pirates
      It's not apparent to me that this is the intended answer, but "Throw pirates 3 and 4 overboard and divide up the rest between 1,2, and 5. Pirates 1 and 2 will agree to the largest share, and pirate 5 always has a say after that, since 3 and 4 can't agree to anything, so he's needed for the majority.


      I'm not so sure about this one, but I think that 'majority' changes with the total number alive. Since 5 is also a greedy pirate, he would do better to conspire with 3 and 4 to split equally among them, since they would get more than if 1 and 2 were included. Of course, this would have other repurcussions, but...

      Now if I could just figure out the black/white hat prisoner execution scenario...

      -SablKnight

    12. Re:some selected answers: by IxnayOnTheIxnay · · Score: 1

      Could you explain the Mysteriuos Triangle Area one a bit more? I don't quite understand. Thanks.

      If you look closely at the two small triangles, you will see that their angles are not the same; the blue one has a slope of 3/8, or 15/40; the red has 2/5, or 16/40. As such, they do not form a straight edge for the hypotenuse of the complete triangle. The top shape actually bows inward where the blue and red meet, the bottom bows outward.

      With that in mind, imagine a line from the tip of each of the conglomerate triangles, the *true* hypotenuse. The area of this triangle is:
      A = .5*13*5 = 32.5
      Now, subtract from that the area of the small shapes, and you get the area of the trangle formed by the real hypotenuse and that of the two small triangles in the top shape (empty space)
      A = 32.5-7-8-(.5*5*2)-(.5*3*8) = 0.5
      Double that value, since an equal amount bulges out of the bottom shape, and there is your missing 1.0 unit.

    13. Re:some selected answers: by Anonymous Coward · · Score: 0

      Parity. The first one may or may not die, but says black if he sees an even number of hats, white if he sees an odd number. After that, everyone can determine what color his hat is by parity and listening to what's been said.

    14. Re:some selected answers: by Anonymous Coward · · Score: 0

      Your solution to Fork in the Road II is wrong. That question will let you figure out which is the liar, but it won't tell you which path to take. You're stupid.

    15. Re:some selected answers: by Aliks · · Score: 1

      Phone booth:

      Not seen any solutions posted yet so try this.
      We are looking at 4 digit binary strings eg 1110. If we don't change anything, then next time we look this string could be 1110, 0111, 1011, or 1101 depending on how many times the booth spun.

      It seems that the only constant thing that we know about the 4 walls is which pairs are opposite.

      When we start off we can assume that 1, 2 or 3 of the switches are on, and the aim is to get 0 or 4 of them on.

      Start off by assuming that 2 switches are on and 2 are off. Pick a pair of opposite walls and flick both switches. If the string was 1010 or 0101 this releases you. Otherwise the string becomes 1100, 0110, or 0011. Pick any pair of adjacent walls and flick both their switches. If you got lucky you won, if not you made the string into a 1010 and for the third turn you can pick either pair of opposite walls and flip both switches.

      Now supposing this sequence of three turns didn't release you.

      You can conclude that either one or 3 of the switches is on. Pick a wall at random and flip its switch. If you were really lucky you just released yourself. If not then you are now looking at 2 switches on and 2 off.

      So repeat the first three moves and you are done!!

    16. Re:some selected answers: by Yunzil · · Score: 2

      Egg Dropping
      18. Drop from the 10th, 20th, 30th, etc. After it breaks, go back 9 floors and start dropping every floor. You use 18 drops if it can drop from the 98th or 99th floors.


      Or you could just do a binary search.

    17. Re:some selected answers: by MasteroftheVoxel · · Score: 1

      The greedy pirates is much more complicated than that. You have to understand that the pirates are infinitely smart. Each pirate wants to get the most gold and throw the others overboard but they know there is an order, and they know what the others will propose.

      Actually, you must start assuming there are only 2 pirates left (1 and 2). If there were only two, well, pirate 2 must give pirate 1 all the gold or he would just be killed. Actually, the problem sort of implies with "bloodthirsty" that pirate 1 would just kill him anyways, but that causes some ambiguity later on, so I am going to assume pirate 2 would offer pirate 1 all the gold and live.

      So, lets look at pirate 3. He knows that if his plan is rejected, pirate 2 will get no gold, and pirate 1 will take all the gold. So he will want to give pirate 2 a favorable deal to get him to vote with him. Here is what he should propose: "999 gold to me (pirate 3) and 1 gold to pirate 2 and 0 gold to pirate 1". Pirate 2 will accept it because he will get a gold piece which is more than he'd get if there were only 2 pirates left. (again depending on how you interpret the "bloodthirsty" comment you could even give him zero pieces if he cared about living). You have a majority and all three live.

      Lets go to pirate 4. He needs two others to agree with him. Pirate 3 stands to get most of the gold with 3 left, so there isn't much he can do for him. Pirate 1 and 2 stand to get little and no gold, so give pirate 1 just 1 piece of gold and pirate 2 will get 2 pieces of gold. His proposal becomes, "998 pieces for me (pirate 4), 1 piece for pirate 1 and 2 pieces for pirate 2).

      Now, pirate 5 actually is in the best situation. He knows that he needs two others to join him and at that stage, and it is pirate 3 and pirate 1 who will lose out if there are only for left.
      So, his offer, and the correct answer to this problem is:

      The offer from pirate 5,
      Give 998 pieces of gold to pirate 5
      Give 2 pieces to pirate 3
      Give 1 piece to pirate 1

      They all live and pirate 5 is very happy.

    18. Re:some selected answers: by SlugLord · · Score: 1

      oops... I made some other errors, but you are indeed correct, and your solution explains the comment about how difficult the question is... almost a trick question. bravo.

    19. Re:some selected answers: by SlugLord · · Score: 1

      no, you only get 2 eggs. you can only subdivide on division of the building. My solution was not quite optimal (using a different base would have been better), but mine was the more obvious choice of base.

    20. Re:some selected answers: by bananahammock · · Score: 1

      I believe your answer to the calendar cube puzzle is close but incorrect as, given the instructions, you would not be able to show either the seventh and eighth of the month given the lack of the second "0". However if your first block had the numbers 0-5 instead, it will work as the nine on the second block can always be turned upside down to give a six.

    21. Re:some selected answers: by dbretton · · Score: 2

      Fork in the Road II

      "Which direction do you come from?"

      And go that way.

    22. Re:some selected answers: by Yunzil · · Score: 2

      Ah, I didn't quite get it.

      But you're answer is still wrong. :)

      You would need 19 drops.

      Worst case is: 10th floor, 20th, 30th, 40th, 50th, 60th, 70th, 80th, 90th, 100th (break #1), 91, 92, 93, 94, 95, 96, 97, 98, 99 (break #2).

      Starting with every ten floors is one of the best choices. Anything between every 8 floors and every 13 floors all require 19 drops.

      It's fairly easy to show 10 is "optimal". The number of drops required is (100 / F) + (F - 1). Take the derivative, set equal to 0 and solve for F. But I've spent enough time on this already. :)

    23. Re:some selected answers: by NeoNormal · · Score: 1

      > The offer from pirate 5,
      > Give 998 pieces of gold to pirate 5
      > Give 2 pieces to pirate 3
      > Give 1 piece to pirate 1

      Boy, I'll never be good at these... I can't even get 998 + 2 + 1 to equal 1000....

    24. Re:some selected answers: by MasteroftheVoxel · · Score: 1

      sorry, change that 998 to 997 :)

    25. Re:some selected answers: by Xenographic · · Score: 1

      Optimal in terms of broken eggs or tries or both?

      If I want to optimise for broken eggs, I just start at the first floor & keep dropping it until it breaks (hint: reuse the egg--it didn't break, dummy!) If it's for number of tries, do a binary search. If it's both, define weighting factors for both first.

    26. Re:some selected answers: by malaire · · Score: 1

      Or use {0,1,2,3,4,5} and {0,1,2,3,6,7} with base 8 numbers (01 to 37)

      This way you don't need to flip 6/9.

  63. These tech interview questions are STUPID by JamieF · · Score: 5, Insightful

    Am I the only one who thinks this interviewing technique is retarded?

    Because Microsoft does something most definitely isn't a reason to emulate it. Microsoft isn't exactly known for producing well designed software, nor software that reuses proven patterns or algorithms that solved known problems 20 years ago. Better to hire a bunch of 21 year old college grads who can solve word problems from 8th grade algebra, and pretend that Microsoft invented computers! Whee.

    When I hire developers I want them to be good developers, not promising young interns. My interview questions typically involve technology questions, process questions, some theoretical PROGRAMMING questions, and some social / communication questions. I'm not saying that hiring smart people is a bad idea, but ignoring skills and only looking at generic problem solving ability is a recipe for unbelievably bad code. It's like hiring musicians based on measured hearing sensitivity and reflexes. OK, maybe that matters if you want to figure out which 5 year old is going to be a prodigy, but hand them an instrument and the noise that comes out is going to sound like ASS.

    Examples of things that "smart" developers I've worked with before have totally missed:
    - the existence of more efficient data structures than arrays
    - generalizing code into reusable chunks (functions, objects, whatever)
    - regular expressions
    - the difference between "client" and "server"
    - the reason for using descriptive variable names
    - collection libraries with built in sorting ("whatcha workin' on?" / "coding up a quicksort algorithm" / "in a J2EE app!?!?")

    You can't just get this from reading a book, either, although that definitely helps. You have to have some degree of EXPERIENCE too: at least a few projects, and some awareness of things like performance tuning, security, coding for maintainability, etc.

    I would use these "tech interview questions" only for hiring interns or recent college grads where the expectation is zero experience, zero clue, zero skill, and a correspondingly low salary. After all you're investing in someone. But for someone that commands a market rate developer salary in the high five figures, screw the brain teasers - just spend a couple of hours grilling them on skills, experience, discipline, etc. They will respect you big time in return because they know when you extend an offer that they won't be working with a bunch of dumb-asses who can get the explorers across the river without being eaten by the headhunters but who can't code their way out of a soggy paper bag.

    1. Re:These tech interview questions are STUPID by MeerCat · · Score: 4, Insightful

      Precisely why companies end up with the wrong employees. My usual answer to these questions is "Sorry, the interview ends here, you failed", or (if I feel like baiting them) to "think outside the box" eg the bridge/flashlight/limited time issue "so, one guy is lighter than the others and they realise they can cross together, or they wait til their eyes adjust to the darkness and they're fine, or they check their watch and realise they have more time than they thought". If the interviewer says "no, wrong answer" I tell them they've missed "the big picture" and they need to "free their minds from the imagined constraints", and then ask them what we're doing next...

      On a similar note, I do NOT want to hire staff who can put a list of obscure C++ operators in order of precedence, I want to hire those who say "well, I'd look it up if need be, but to make sure the next guy reading my code doesn't get confused I'd simplify the expressions with braces"... bingo - instant pass !

      Interview questions should be open, not closed.

      --
      T

      --
      I spent a lot of money on booze, birds and fast cars. The rest I just squandered. - George Best
    2. Re:These tech interview questions are STUPID by (H)olyGeekboy · · Score: 1

      Am I the only one who thinks this interviewing technique is retarded?

      You couldn't figure the riddles out either, eh?

    3. Re:These tech interview questions are STUPID by randombit · · Score: 2

      Am I the only one who thinks this interviewing technique is retarded?

      In terms of actually finding people who are skilled and will do the job correctly, yes.

      The only time I had to go through an actual interview process of any sort was a Unix sysadmin job (part time assistant admin, specifically), and it was a pretty good way to run it, I think.

      First the guy asks me some random questions about experience, etc. Then he asked me what various things were, like "What does IMAP stand for and what does it do?" Finally, he pulls out some sort of SPARC. My memory is hazy but IIRC it was an Ultra. Probably an Ulra5. Anyway, so he starts pointing at stuff inside and asking "What is this?" The idea is to see how well I could figure out some random piece of hardware I'd never seen before.

      I thought, given the envoronment there (wildly hetergenous setup - OS X, Linux, Ultrix, Solaris, NeXT, who knows what else) it was pretty good, if relativly trivial, test.

      I would use these "tech interview questions" only for hiring interns or recent college grads where the expectation is zero experience, zero clue, zero skill, and a correspondingly low salary.

      I am sort of vaguely insulted by that (as I am still in college for the next 6 months). I would agree that many people around here have no clue, but there are a decent number (and I include myself in the category) who are reasonably skilled. Probably that's because about 90% of what I know about creating software has come from working either on projects at work (like real software that people actually use) or free software.

      Certainly I would agree that someone who just did the work in class would not be particular good, since it's pretty rare to have a class project that's really large enough (and long-lived enough) to really teach you about things like maintainability, portablity, security, etc.

    4. Re:These tech interview questions are STUPID by greenrd · · Score: 1
      On a similar note, I do NOT want to hire staff who can put a list of obscure C++ operators in order of precedence, I want to hire those who say "well, I'd look it up if need be, but to make sure the next guy reading my code doesn't get confused I'd simplify the expressions with braces"... bingo - instant pass !

      Yes! Absolutely. Code should not rely on seldom-used operator precedence rules - that just hinders readability for those who aren't familiar with those rules.

      Just a few common ones will do: ! > &&, / > -, etc.

    5. Re:These tech interview questions are STUPID by tps12 · · Score: 0, Troll

      Sysadmins are not programmers, despite your aspirations. I also think the OP didn't go far enough: even fresh grads should be held to those standards.

      CS programs are largely terrible at teaching skills necessary outside of academia (hm, wonder why that is...). If you want to be a big industry player like Bill Gates, Linux Torvalds, or Edward Raymond, you have to be able to pick things up on your own.

      --

      Karma: Good (despite my invention of the Karma: sig)
    6. Re:These tech interview questions are STUPID by rufusdufus · · Score: 2

      I have mostly seen the reverse problem when it comes to arrays. Everyone studied linked lists, trees, splays, what-have-you in school so they use them everywhere. Most of the time (in boiler-plate code) arrays are the right answer. Arrays are simple, memory efficient and fast.
      Granted, when arrays start causing algorithmic inefficiencies in larger data sets, you gotta know when and how to switch.

      Regular expressions are apparently not understood by the most successful programmers in the world, because severval of the billionaire and hundred-millionaire coders I know made their dough on the most hideous hacks I've ever seen. They made something that worked once, and now whole companies are reliant on their hacks. Kind of sad, but not for them.

  64. Proudly Serving My Corporate Masters by wrinkledshirt · · Score: 1

    This book by Adam Barr (available online here) talks about the Microsoft interview process and how the dynamic evolved, including some discussion on trick questions.

    --

    --------
    Bleah! Heh heh heh... BLEAH BLEAH!!! Ha ha ha ha...

  65. rec.puzzles by valentyn · · Score: 3, Informative
    There are lots of these sorts of puzzle sites. One of the older/more famous is the rec.puzzles archive. Find it at here.

    Another good resource: the Princeton Mathclub

    --
    my other sig is a 500 page novel
  66. Mastermind II Impossible by fdiv(1,0) · · Score: 1

    As stated, Mastermind II is not possible.

    Let's step through this logically. I will call the rows as numbered as in the puzzle and the positions as numbered left to right, leftmost being position #1. Thus, the ball at row 1, position 3 is the red one.

    Comparing lines 1 and 2, we see three of the colors from one have been copied in two. Since there are two "pegs" (not counting black/white color yet) in 2, and one in 1, the new ball (yellow) must be triggering one of the pegs. Therefore, one ball in the solution is yellow. Also, therefore one of the three "copied" balls is triggering a peg, therefore the non-copied ball (red) is not in the solution.

    Going on to three, line three states two of the balls are in the correct position. Since we know yellow is one of our balls, we now know the position of yellow in the solution (position 3).

    Going back to line two, we now know the yellow ball is the one triggering the white peg (right color, wrong position). Therefore one of the other three balls is triggering the black peg (right color, right position). We have three choices: lt blue, dk blue, and green. It can't be dk blue because we know there's a green or a lt blue ball in the right position in line three...but it can't be green or lt blue because there's no shared positions between those two lines! Thereore, as stated, there is no solution to this puzzle.

    Contests to this logic are welcomed.

    --
    --- "...And everybody died!!! Except for me, of course...you know why? Because I had my tray table up...and my seat ba
    1. Re:Mastermind II Impossible by Anonymous Coward · · Score: 0

      It's the first row that is the key. You know that only 1 of those 4 colors is in the answer. That means you eliminate red and dark blue. Let's use false logic to eliminate the green. 1st row - wrong position, no lt. or dk. blue, red. 2nd row, either green or yellow is in right pos. 3rd row - yellow and leftmost green must be in right position. 4th row - should have 2 whites if 3rd row was correct, you can eliminate purple also because there is now 3rd white, and you know lt. blue doesn't exist. Therefore there is no solution using green. Once you know lt. blue is in there, but not in the leftmost position it becomes clear. Remember that green, dk. blue and red have been eliminated as possibilities.

    2. Re:Mastermind II Impossible by CProgrammer98 · · Score: 2

      So, how come the solution is Yellow, Yellow, Yellow, Light Blue (left to right) ???

      --
      And the people shall be oppressed, every one by another, and every one by his neighbour Isaiah 3:5
    3. Re:Mastermind II Impossible by CProgrammer98 · · Score: 1

      Going back to line two, we now know the yellow ball is the one triggering the white peg (right color, wrong position).

      nope. There's a yellow in 2 AND 3, lite blue is triggereing the white in line 2

      --
      And the people shall be oppressed, every one by another, and every one by his neighbour Isaiah 3:5
  67. Infuriating,,, by Grape+Shasta · · Score: 4, Interesting
    The thing that drives me nuts is not having the "right" answer to check my answers against. Look at this one, for example:

    willywutang is hanging out on a heavily forested island that's really narrow: it's a narrow strip of land that's ten miles long. let's label one end of the strip A, and the other end B. a fire has started at A, and the fire is moving toward B at the rate of 1 mph. at the same time, there's a 2 mph wind blowing in the direction from A toward B. what can willywu do to save himself from burning to death?! assume that willywu can't swim and there are no boats, jetcopters, teleportation devices, etc.. (if he does nothing, willywu will be toast after at most 10 hours, since 10 miles / 1 mph = 10 hours)

    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
    1. Re:Infuriating,,, by WilliamWu · · Score: 1

      hi! glad you checked out the site. sorry about driving you nuts, but that's actually one of my goals in not providing answers -- i think torture makes the solutions more joyful. if i provided answers, i think most people would be tempted to click on the solutions after a mere few minutes of thought, and that could ruin the learning experience, and the fun. the clever answer is a firebreak.

      --
      William Wu http://www.ocf.berkeley.edu/~wwu
    2. Re:Infuriating,,, by Grape+Shasta · · Score: 2
      Well, obviously I do like the site, or I wouldn't be bothering with it. You're probably right, it's infuriating in a good way.

      I don't care for this particular riddle, though... most of them have an aha! type of answer, which when you think of it is clearly the right one. But how could this guy make a firebreak? Does he have tools to cut down the trees? It just doesn't seem like an answer that must be the right one. I find the idea of making a raft from logs in the woods more likely. Oh well..

      --

      "I am a cipher, a cipher, wrapped in an enigma, smothered in secret sauce" -Jimmy James
    3. Re:Infuriating,,, by nils · · Score: 2, Informative
      willywutang is hanging out on a heavily forested island that's really narrow: it's a narrow strip of land that's ten miles long. let's label one end of the strip A, and the other end B. a fire has started at A, and the fire is moving toward B at the rate of 1 mph. at the same time, there's a 2 mph wind blowing in the direction from A toward B. what can willywu do to save himself from burning to death?! assume that willywu can't swim and there are no boats, jetcopters, teleportation devices, etc.. (if he does nothing, willywu will be toast after at most 10 hours, since 10 miles / 1 mph = 10 hours)
      It's easy: willywutang grabs a burning log from the fire, runs to let's say the middle of the island, sets fire to the wood there, watches the wood turn into ashes (with the fire moving towards B) and when the fire coming from A would reach him, he can easily retreat to the no longer burning ashes.
    4. Re:Infuriating,,, by Anonymous Coward · · Score: 0

      Going down to the sandy beach would be a good start. Ok, so maybe it doesn't exist.

      A back fire would work also since the 10mph west wind would be canceled out by the fire sucking in air from the opposite direction. You just need to make sure the fire is sucking in enough air from the east to prevent it from going west.

      Another option is to find a clearing with dry grass. Start a fire burning in a circle. Wait for it to get 15 - 20 feet burned out, then jump into the circle and watch the fire go past you.

      Remember you can't burn something more than once.

    5. Re:Infuriating,,, by Tomster · · Score: 1

      The point isn't getting it "right"; usually there's many solutions (sometimes there are none). The point is for the interviewer to get an idea of how well you think. Can you think creatively? Can you justify your reasoning? Can you ask for more information if you need it? Etc.

      BTW, this particular problem is the core of a wonderful little story called "Hellhole", by David Gerrold. The protagonist (an alien spaceship captain from a world unfamiliar with "burning" as we know it) figures out how to save herself by starting a back fire.

    6. Re:Infuriating,,, by Trak · · Score: 2, Informative

      The answer they are looking for has to do with starting a second fire between the burning end of the island and the safe end. Then when the first fire reaches willy, he just steps into the burned-out space from the second fire which he started.

    7. Re:Infuriating,,, by Fjord · · Score: 1

      The common answer I've heard for this is to start a fire in the B direction of you. Then just walk into the burned up area when that fire has moved, as the other fire can't go there. Apparently this is an actual technique used by fire fighters. However, I've I'm on a really narrow island, I'd run for the water and wade in it (it says I can't swim, but that doesn't mean I can't wade).

      --
      -no broken link
    8. Re:Infuriating,,, by Just+Some+Guy · · Score: 2
      [T]he clever answer is a firebreak.

      I disagree. That's one answer, but it's not particularly clever. Better, in my opinion, are:

      • Wade (not swim!) a short distance into the water, go around the fire, and come back.
      • Use whatever vehicle or method he used to get onto the island to get back off. If he's there involuntarily (i.e. by shipwreck), then:
        • If he has fireproof storage for his food, then get in it. Otherwise:
        • When the fire has decimated the whole island, he will shortly starve to death, unless he has a reasonable fishing beach or small boat, in which case see my first answer. He needs to decide between the painful-but-quick death or the painful-but-slow death.
      --
      Dewey, what part of this looks like authorities should be involved?
    9. Re:Infuriating,,, by Anonymous Coward · · Score: 0

      Couldn't he just stand on the beach? I mean, this is an island after all. Sure sand can melt, but it is not flammable, so he should be safe (barring extreme smoke inhalation).

    10. Re:Infuriating,,, by Anonymous Coward · · Score: 0

      what can willywu do to save himself from burning to death?! assume that willywu can't swim

      Jump in water and drown, thereby avoiding burning to death.

    11. Re:Infuriating,,, by SamTheButcher · · Score: 1
      He can't swim, but since when did you have to know how to swim to stand in the water? Go to where the fire line is, get in the water, walk around to where the fire isn't, get out.

      Is it learning if it's just a really weird question?

    12. Re:Infuriating,,, by jcsehak · · Score: 2

      Huh? I don't see how this would work. The fire is at A, and Willy runs to C (the center point of the island), and starts a fire (for simplicity's sake let's say he uses matches, rather than grabbing a burning log). Okay, now he's got a fire going from A to B, C to B and C back at him up to A! Is a 2 mph wind strong enough to hold back the fire going from C to A? I doubt it--the island is heavily forested. The other solution would be to simply dig a ditch, but that's also impossible in a heavily forested area, unless he's got a chainsaw. The only acceptable solution I can think of is to wade out in the water, which seems like a cop-out, as far as answers to riddles go.

      --

      c-hack.com |
    13. Re:Infuriating,,, by ebh · · Score: 1

      The fire is burning toward him at 1mph, but the smoke is blowing toward him at 2mph. Therefore all he has to so is asphyxiate himself on the smoke, and then he won't burn to death...

    14. Re:Infuriating,,, by Jerf · · Score: 2

      This is what annoys me about this problem. The same 'force' driving the fire (most likely the wind) will drive the smoke in the same direction, so anybody approaching it from the to-be-burned side will die before being able to grab a burning stick.

      Too many of these questions disintegrate when considered as a real situation, leaving anybody knowlegable about the subject material out of luck. (Not that I'm a fire expert, but I know something about the topic, which is that Mr. Stuck On The Island better learn to hold his breath. People only rarely burn to death, smoke inhalation is tens or hundreds of times more common.)

    15. Re:Infuriating,,, by Anonymous Coward · · Score: 0

      you know that fire burns in direction of B because kind is blowing that way.

      so take a burning piece of wood .. sttanding in the middle of the island start a second fire about a mile from end B .. the fire will burn up and exhaust itself .. by the time that portion (second fire) of the forest burns up, willywutang can go sit there in the burnt up section of the island near B (the fire wont reach him because he has burnt up the forest already so the fire started at A cant get to him)

      -johan

  68. Cynical by The+Cat · · Score: 2

    Asking questions like this during an interview makes a mockery of the interview process, patronizes the candidate and is usually suggested by a career middle-manager seeking to assert their importance at the expense of the dignity of the candidate.

    People's careers should not depend on the last five pages of a 99 cent brain teaser book.

    The answer to all of them (in an interview) is "thanks for the coffee."

    1. Re:Cynical by Asic+Eng · · Score: 2
      Well, it's the old garbage in/garbage out thingy. If your interview process focusses on riddles you'll end up hiring people who are good at riddles.

      Alternatively you could focuss the interview on e.g. software development.

      I imagine in that case you can't just pick up a book and look up the answers however - you need to actually thoroughly understand the topic, to evaluate the candidate.

  69. Re:Mastermind II Impossible (spoiler) by Anonymous Coward · · Score: 0

    I read a whole (very dull) book of Mastermind puzzles once.

    I agree with your logic up to the point where yellow must be in position 3. Then you say: "we now know the yellow ball is the one triggering the white peg (right color, wrong position)". That is faulty mastermind logic. The solution could be "xxx YELLOW YELLOW xxx", which gives YELLOW a black peg for position 3, and no white pegs for YELLOW!

    Continuing down this path, I solve it as: YELLOW YELLOW YELLOW LIGHTBLUE.

  70. Or... by Anonymous Coward · · Score: 0

    If you want some REAL hard math problems you can try here.

  71. Re:Mastermind II Impossible (spoiler) by fdiv(1,0) · · Score: 1

    I stand corrected. Thank you.

    --
    --- "...And everybody died!!! Except for me, of course...you know why? Because I had my tray table up...and my seat ba
  72. Manhole covers by One+Louder · · Score: 1

    Why are manholes round? Note: This is a famous Microsoft question. Yet amusingly, the Microsoft campus uses square manholes.

    I would guess that the expected answer is that the circle is the only shape that won't fall through a hole the same shape but slightly smaller.

    However, that's not the case. There are an infinite number of non-circular shapes with the same property. Anyone else know what they are?

    1. Re:Manhole covers by Anonymous+Squonk · · Score: 1

      Because they are heavy. You can roll a round manhole around much easier than you could carry a triangular one.

    2. Re:Manhole covers by Anonymous Coward · · Score: 0

      That's all well and good, but round manhole covers have one other virtue - they can be rolled to the hole instead of carried (you can't do that with a triangular manhole cover)

    3. Re:Manhole covers by Anonymous Coward · · Score: 0

      So why does MS use non-circular man-holes?

    4. Re:Manhole covers by shird · · Score: 1

      I always thought the answer was because the manholes themselves are round. Therefore, the covers should be round... But I think the ability to roll them around could be a more correct answer.

      --
      I.O.U One Sig.
    5. Re:Manhole covers by mccalli · · Score: 2
      Why are manholes round? Note: This is a famous Microsoft question.

      Aah....that's where this rubbish comes from is it? I got asked that question whilst interviewing for a job at a major US bank (in London). My answer was "manhole covers are round to fit round manholes, and beyond that I do not consider manhole covers". I was quite sharp.

      It took them back a bit, but companies forget that this is an interview, ie. you aquire a view of them as they aquire a view of you. My view of them was influenced by that question - it showed they were a fad-based set of idiots, and immediately that question was asked I no longer had any interest in working there.

      I didn't get the job of course. The feedback I got was "he was technically fine, but I don't think he took the interview seriously....". Naah. Really? Can't think why.

      Cheers,
      Ian

    6. Re:Manhole covers by Ratface · · Score: 2

      Umm, also because the round shape allows for the largest possible object to be fitted through at any orientation for the given surface area.

      Say you have a fat workman who represents the maximum size person you require to be fitted down a manhole. Measuring his body in cross-sections you find that the largest diameter across his body is 75cm. A circular manhole that has a diameter of 76cm (giving him a little extra room) has a smaller surface area than a square with sides measuring 76cm. The smaller the surface area, the cheaper the manhole!

      Sound right??

      --

      A little planning goes a long way...
    7. Re:Manhole covers by Anonymous Coward · · Score: 0

      They obviously hired a shitty civil design firm, and accepted the bid of a shitty construction firm.

    8. Re:Manhole covers by bluGill · · Score: 2

      But what if the object you need to fit down the manhole is not round? Say a normal skinny persona is asked to get a stove down the hole. (Why is byond the scope of this discussion) Stoves are big, and square. So the ideal shape would be a square hole just biiger then the stove, so it can be lowered into the hole. Nobody in their right mind would carry a stove down the ladder, so they would have to get a tripod to lower it, therefore they just need enough room for the stove to fit, with straps on.

  73. Real-world questions by Animats · · Score: 3, Interesting
    • Explain why the stock market just crashed, outline the expected future of the economy for the next year or two, and indicate a general strategy for the company for this difficult time.
    • Will Microsoft's new approach to security work? Why or why not?
    • Based on recent news events, what level of effort should be applied to defending against info-war attacks?
    • Should we port to Itanium, Sledgehammer, or neither?
    • In an environment of Windows and Mac desktops, and Linux servers, what are the major integration problems?
    • How can we avoid an SPA audit?
    • We'd like to cut the load on our web site servers in half without losing any revenue. What should we do?
    • Historically, what copy-protection systems have worked successfully? Why?
    • Should we use C#? Why?
    1. Re:Real-world questions by stephenbooth · · Score: 1

      We'd like to cut the load on our web site servers in half without losing any revenue. What should we do?

      Hang the entire marketing department. Get someone who actually understands the difference between a web page and a paper brochure to redesign the site to be clean and fast loading with standards compliant HTML, only necessary graphics (and those that are there have been sized correctly, e.g. don't have a 1024x768 graphic served that in the browser is rendered as 100x76) and no Flash.

      See, easy.

      Stephen

      --
      "Don't write down to your readers, the only people less intelligent than you can't read" - Sign on Newspaper Office Wall
  74. So you think hard is sexy? by Anonymous Coward · · Score: 0

    Hmmmm ...

    1. Re:So you think hard is sexy? by SlugLord · · Score: 1

      I think for an answer to be sexy, it must not be obvious. Thus "hard," at least until you solve it or know the solution. Many things are easy with the proper prior knowledge, and many of these are sexy, but they are sexy because the solution seems so easy, but is so difficult to synthesize.

  75. What's the solution to 5 pieces to form square? by Mustang+Matt · · Score: 2

    I printed it out and cut them up. It's late, but I'm just not getting it. Any hints?

    It's under the hard difficulty.

    --
    The man who trades freedom for security does not deserve nor will he ever receive either. - Benjamin Franklin
    1. Re:What's the solution to 5 pieces to form square? by Jon+Evans · · Score: 1

      Do it the "long way" like I had to.

      Measure each piece and work out its area. Add up the areas. Take the square root. Now you know how long one side should be. Have a look for edges that add up to the length of one side.

  76. Light bulb riddle by Pappaschlong · · Score: 0

    Wasn't sure if this was on the site (I didn't see it), but I really like it... You are in a room w/ 3 on/off switches. There are three lightbulbs in another room. How do you tell which switch goes to which, entering the other room only once? (w/o looking at the wiring)

  77. The Best Microsoft Riddle by doorbot.com · · Score: 1

    Really, this is on the website, under the "Micro$oft" section:

    "y do u wanna work at Microsoft?"

    Now there's a good riddle...

  78. The zen NT server by chefren · · Score: 1

    If an NT server crashes, but no-one is there to see the blue screen, then has it really crashed?

  79. stupid non-standardized logical notation by Bastian · · Score: 2

    So if ^ is XOR, what is AND?

    1. Re:stupid non-standardized logical notation by CProgrammer98 · · Score: 1

      AND is & of course
      OR is |

      --
      And the people shall be oppressed, every one by another, and every one by his neighbour Isaiah 3:5
    2. Re:stupid non-standardized logical notation by Frogg · · Score: 1

      ...erm, '&' is the notation for AND.... and it's perfectally normal to use '^' for XOR.

  80. You can see where this has led Microsoft by g4dget · · Score: 3, Insightful

    Yes, these questions look exactly what Microsoft optimizes for: employees who are really "smart" in a Mensa-sort-of-way. Too bad that programming isn't about being "smart", it's about craftsmanship, taste, engineering tradeoffs, tradition, experience, and long-term dedication. And, not surprisingly, those are areas where Microsoft is sadly lacking.

  81. UNIX Admin Questions by Anonymous Coward · · Score: 2, Funny

    I was once asked in an interview the following question in order to assert my UNIX administration capabilities:

    "Name a sendmail exploit, past or present and quote a line from '2001'."

  82. It would suck. . . by Bastian · · Score: 2

    Since with two condoms on the likelihood of both breaking is pretty high.

  83. It was written that way by Anonymous Coward · · Score: 0

    At least, the version I first read about 25 years ago was written with 1 battlefield surgeon, 3 patients, and 2 sets of gloves.

    The surgeon version has the advantage that "don't do patient #3" is not an acceptable option.

  84. Call me kinky. . . by Bastian · · Score: 2

    Just have a co-ed circle jerk.

  85. One from Lewis Carroll (well- Charles Dodgson) by Chris+Johnson · · Score: 2

    If it takes two men three and a half hours to build a brick wall, how long does it take twenty thousand men?

    1. Re:One from Lewis Carroll (well- Charles Dodgson) by Uttles · · Score: 2

      43 days 8 hours 25 minutes

      --

      ~ now you know
  86. bunch of riddles and answers... by mgblst · · Score: 3, Interesting

    This site contains answers to many of the microsoft questions.

    http://www.acetheinterview.com/cgi-bin/qanda.cgi ?a ction=topics&number=3

    i suppose the answer to many riddles is, look it up on google?

  87. An easy one for you: by Anonymous Coward · · Score: 0

    I had this one once:

    A man walks one mile south, one mile east, one mile north, ends up at the same place he started. He shoots a bear at that place. What colour was the bear?

    1. Re:An easy one for you: by NigelJohnstone · · Score: 1

      Well yeh, Northpole = white polar bear.

      But there's other places where you can do this.
      Just north of the south pole (1.16 miles north of the south pole).
      You walk one mile south. Now if you walk one mile east you will make a full circle of the global. Now walk one mile north - you're back at the start.

      You shoot a bear there, since there aren't any real bears at the south pole, it must be the teddy bear you took to keep you company.

      Hence its light brown, because thats the conventional colour for teddy bears. :->

  88. y do u want to work 4 microsoft? by Anonymous Coward · · Score: 0

    I don't. Is the interview over now? How did I get here? Did u kidnap me?

  89. The Chicken from Minsk by perky · · Score: 2

    For more of this kind of thing, I recomend a book called The Chicken from Minsk. It has some pretty tough questions, and they are posed in such a way that they often make you giggle.

    --
    "The new wave is not value-added; it's garbage-subtracted" - Esther Dyson, Dec 1994
    1. Re:The Chicken from Minsk by Laplace · · Score: 2

      they are posed in such a way that they often make you giggle.

      Only if you're a poofta.

      --
      The middle mind speaks!
  90. +1, FUNNY! by Anonymous Coward · · Score: 0

    Love that quote.

  91. Another Answer by Anonymous+Squonk · · Score: 1

    Split one condom down the middle and cut into two pieces. Use them as dental dams to have oral sex with two women while wearing the other condom and banging the third.

  92. Waste of time... by Anonymous Coward · · Score: 0

    Unless verifiably correct answers are included, these types of questions are useless to use in interviews.

    - the solution to this post is left as an exercise for the reader.

  93. The "triangle" test by alapalaya · · Score: 1

    here

    IMHO no one of the two figures is a triangle...! Am I wrong? Or the test statement is tricky?
    Cheers

    --
    667 The Neighbour of the Beast
    1. Re:The "triangle" test by Anonymous Coward · · Score: 0

      1 of the 2 triangle shaped pieces has base 8, height 3, the other has base 5 height 2. They are not 'similar' triangles (5/8 x 3 = 15/8, not 2) so the long side of the assembled triangle is not actually a straight line, and the two rearrangements are therefore different shapes.

    2. Re:The "triangle" test by alapalaya · · Score: 1

      Yes, you're right. So the question is wrong (it talks explicitly of "triangles")....! very bad!

      --
      667 The Neighbour of the Beast
  94. A Dilemma: by NigelJohnstone · · Score: 1

    Read this one, it was shown in the Mail on Sunday Newspaper in the UK and the mail incorrectly said you should switch and your chances would be better if you switched. Teachers, clear thinkers etc wrote to them but they stood by their position that you should switch and your chances would be better if you switched.

    "You are a contestant on Monty Hall's game show. You are presented with three doors: 1, 2, and 3. One of the doors has a million dollars behind it. The other two have goats behind them. You do not know ahead of time what is behind any of the doors. Monty asks you to choose a door. You pick one of the doors and announce it. Monty then counters by showing you one of the doors with a goat behind it and asks you if you would like to keep the door you chose, or switch to the other unknown door. Should you switch? Explain why. What is the probability if you don't switch? What is the probability if you do? "

    The Mail said 'yes you always switch', because you had a 33% chance of being right and 66% chance of it being behind the other 2 doors. After they reveal one of the other 2 doors, the other door has a 66% chance of being the money. Your door only has a 33% chance hence you should switch.

    Of course thats nonsense, when he revealed the door he changed the probabilities by reducing the number of options. So of course they are not 66%/33%, they are now 50-50. So there is no advantage to changing.

    So here's the dilema:

    If you went for an interview with the Mail on Sunday and gave the correct answer you will not get the job, if you give the incorrect answer you will get the job.

    Do you give the correct answer or not?

    Isn't interviews about toadying up to the interviewer behind the desk regardless of their mental abilities?

    1. Re:A Dilemma: by kwishot · · Score: 2

      Although it's more circumstantial than anything, would it be possible that they wouldn't show you a losing door under certain circumstances and they would under others?
      Ex: Would they only show you a losing door if you had chosen the winning door, to try to "coax" you away? Have you ever tried to see them convince you to pick the *right* door?
      By this logic, it would be adviseable not to switch.

      -kwishot

    2. Re:A Dilemma: by Anonymous Coward · · Score: 0

      This bugged me too. I think the 'proof' is pretty shakey. To the point where I whipped out a spreadsheet and had to work it all out for myself.

      I wanted to make sure I got everything covered and notheing was forgotten, so, even though many of the combinations do not make sense, there are 4 variables:
      Where the loot is
      Which door you pick the first time.
      Which door you pick the second time
      Which door is shown to you.

      Each one has 3 choices. This means there are 3^4 or 81 possibilities.
      Interestingly, 27 of these 81 possibilities are wins. 1 in 3. Of course, this includes all of the 'picking wrong' choices when you're shown the right one, but right now this is still purely a math question.

      Now, the weed out. Select only the ones that make sense. This means pulling out
      showing you the prize,
      showing the door you alreadly selected,
      and choosing the door shown to you.
      This brings you down to only 24 'real' outcomes for the game.

      Of these valid choices, there are 12 choices where there is a winner.
      6 of them are when you remain with your choice.
      6 are when you change your mind.

      So, 12 wins out of 24. 50% odds regardless of which of the 3 choices you start with.

      The problem in the proof is that they change the wrong number.
      it's not a 1 in 3 chance becoming a 2 in 3,
      it's that a 1 in 3 chance becomes a 1 in 2.

      If you wanted to try to change the rules to make the proof right you still fail. To follow the proof you would have to increase the chances of changing being correct - the only way you can do this is by showing them a door when they are wrong.

      Problem is, is that this makes it a 100% chance to get the correct one because they only ask if you want to change when you're wrong - removing 2 of the 3 choices for you!

      If they do it every time, we're at 50/50.
      The fun is that he winning strategies are only 50/50 as well, so your best bet is randomness. Sticking to the same routine (like always switch) will drop your chances.

      Ha!

    3. Re:A Dilemma: by rufusdufus · · Score: 2

      The correct answer for this is "flip a coin", this guarantee's you a 50-50 chance of winning.
      (the logic give in the parent mail is incorrect, if Monty hall is not biased, the odds are 66% if you switch. Write a program...)
      The canonical answer 'switch' is not best because it does not take into account the intentions of Monty Hall. If Monty wants you to lose (and he knows where the goats are), he will give you a second chance in only the cases that you picked correctly the first time. Of course, if he wants you to win (for ratings and ads we presume), he will give you a second chance only if you didnt pick correctly the first time. Given a total lack of information on Monty's information and intentions, you do best to go with a coin flip.

    4. Re:A Dilemma: by NigelJohnstone · · Score: 1

      "Sticking to the same routine (like always switch) will drop your chances."

      Well erm, thats a nice point of view Mr Interviewer and I respect and fully support your out-of-the-box thinking style and look forward to working here....

    5. Re:A Dilemma: by Gingko · · Score: 2

      Actually, you're wrong. It's really counter intuitive, and people take forever to be convinced, but you should switch (assuming this is your only chance, Monty is unbiased etc.).

      Monty opening the door and revealing a goat tells you nothing. You already know that there's a goat behind one of those doors.

      Here's a better example. Imagine a pack of cards. Monty asks you to choose which card is the Ace of Spades. You choose one at random. Now, Monty asks whether you'd like to stick, or change your decision to whether the Ace of Spades lies in the other 51 cards. Once you have made the decision, Monty then throws away 50 cards from the pile which aren't the Ace of Spades. Have the probabilities changed? Not at all. You'd still go with choosing the larger pile.

      Henry

      --
      i don't do sigs. oops.
    6. Re:A Dilemma: by obdii_for_dummies · · Score: 1

      The Mail is correct.

      If Monty has freedom of choice, that is if Monty were to expose a goat BEFORE you made your first choice, then you would be left with a 50-50 pick between the remaining goat and the cash.

      But the game is conducted such that Monty can only expose a goat AFTER you have made your initial choice.

      Because Monty can only expose a goat AFTER you make your choice then there is a chance that Monty's freedom of choice is removed because Monty cannot choose the door you have already chosen and if you have chosen a goat Monty has no freedom of choice.

      Monty's knowledge of where the goats are, coupled with your initial choice sometimes constraining Monty's choice is what changes the odds.

      Legend:
      D1 = Door 1
      D2 = Door 2
      D3 = Door 3
      G1 = Possible game configuration 1
      G2 = Possible game configuration 2
      G3 = Possible game configuration 3
      G = Goat
      $ = 1 million dollars

      List all game/choice possibilities and count the odds.
      D1 D2 D3
      G1: G G $
      G2: G $ G
      G3: $ G G

      You choose D1
      G1: G X X Monty MUST open D2 to expose a goat - if you change you WIN
      G2: G X X Monty MUST open D3 to expose a goat - if you change you WIN
      G3: $ X X Monty can open D2 or D3 to expose a goat - if you change you LOSE

      You choose D2
      G1: X G X Monty MUST open D1 to expose a goat - if you change you WIN
      G2: X $ X Monty can open D1 or D3 to expose a goat - if you change you LOSE
      G3: X G X Monty MUST open D3 to expose a goat - if you change you WIN

      You choose D3
      G1: X X $ Monty can open D1 or D2 to expose a goat - if you change you LOSE
      G2: X X G Monty MUST open D1 to expose a goat - if you change you WIN
      G3: X X G Monty MUST open D2 to expose a goat - if you change you WIN

      So it's fairly easy to see that changing will cause you to win more often than not.
      Actually you will win 66% of the time if you change.

    7. Re:A Dilemma: by CProgrammer98 · · Score: 2

      Your odds have improved to 50/50 from 33/67. i.e. your first choice is probably wrong. so you're better off switching.
      Actually, the Mail is correct.

      By switching, you are GUARANTEEING odds of 50/50. By not switching, your odds are still 33/67

      If you don't beleive me, write a program to simulate it... Proof of the pudding....

      This is an old Mensa puzzle and was discussed endlessly in the noew defunct Mensa forum on Compuserve

      --
      And the people shall be oppressed, every one by another, and every one by his neighbour Isaiah 3:5
    8. Re:A Dilemma: by CProgrammer98 · · Score: 1

      The assumtion is that you're ALWAYS shown a goat and asked if you want to switch. It's a logic puzle!

      --
      And the people shall be oppressed, every one by another, and every one by his neighbour Isaiah 3:5
    9. Re:A Dilemma: by CProgrammer98 · · Score: 2, Informative

      There's excellent explanations of why it's correct to switch here and here

      --
      And the people shall be oppressed, every one by another, and every one by his neighbour Isaiah 3:5
    10. Re:A Dilemma: by obdii_for_dummies · · Score: 1
      By switching, you are GUARANTEEING odds of 50/50. By not switching, your odds are still 33/67
      No, by switching you are reversing the odds from 33/67 to 67/33.
    11. Re:A Dilemma: by CProgrammer98 · · Score: 1

      quite right, It's been a long day.

      --
      And the people shall be oppressed, every one by another, and every one by his neighbour Isaiah 3:5
    12. Re:A Dilemma: by NigelJohnstone · · Score: 1

      now I understand where the difference between the two groups is.

      "Monty then counters by showing you one of the doors with a goat behind it and asks you if you would like to keep the door you chose"

      In my interpretation, he chooses a door, that door happens to have a goat behind it. In other instances it might have the prize behind it.

      But in the greylabyrinth.com interpretation, he always chooses to reveal a door with a bad prize between the remaining two doors. (i.e. he has pre-knowledge and chooses a suitable door)

      No wonder each group of mathematicians argues to the death about this. Its an English puzzle not a maths one!

    13. Re:A Dilemma: by One+Louder · · Score: 1

      Unfortunately, you're wrong. You should switch.

      This has been beaten to death any number of times on Usenet. But don't take my word for it, and don't argue with me - try it with a friend and you'll see.

    14. Re:A Dilemma: by CProgrammer98 · · Score: 1

      Yes, he will always show you a door with the goat - why would he show you the door with the prize? You've lost anyway then!

      --
      And the people shall be oppressed, every one by another, and every one by his neighbour Isaiah 3:5
    15. Re:A Dilemma: by NigelJohnstone · · Score: 1

      I thought he didn't know and was revealing doors at random to confirm whether you win or lose.

      Something like
      "Contestant, you chose door C, so lets see what was behind door A, a goat, (audience goes phew), now are you sure you don't want to switch?"

      If he always chooses a door with a goat behind it first, then there is no suspense. Hence it made sense to me that he was choosing at random between the two remaining doors.

      But it also means he will rule out situations where the price is behind the first door he reveals because then you don't get the opportunity to switch. Then it becomes straight 50-50.

      So now I understand why there was such a fuss with both sides adamant they were correct.

    16. Re:A Dilemma: by Anonymous Coward · · Score: 0

      You are wrong! Its best to switch.
      You are wrong! Its best to switch.

  95. Argh! by Chris+Johnson · · Score: 3, Funny
    *probable spoilers, only without workings* Anyone else having this problem? With certain puzzles, I'm struck forcefully with an answer but I can't (currently) come up with the rationalization to show it is unarguably correct.

    For instance: Brown Eyes and Red Eyes. I have this sense that upon being told by the outsider 'at least one of you has red eyes' (no top limit to the number), ALL the monks go commit suicide at midnight. I can see they still can't communicate, and can't prove they're not among the not-red-eyed, but there are links in the logical chain missing here- yet it points to that result somehow, due to their non-self-awareness and the confirmation that there are red-eyes present.

    By the same token- The mother is 21 years older than the child. In 6 years from now, the mother will be 5 times as old as the child. Question: Where's the father? I have to say: on top of the mother, conceiving the child- but I can't get the numbers to add up to anything sensible, it's just the only intersection that would give you the location of the father! *rrrrr*

    And finally, 0.999999... is not 1.0000000.... really it's not, though in practice, well...

    1. Re:Argh! by Lazarus+Short · · Score: 2

      (hints and spoilers in this post)

      HINT:

      Brown/Red Eyed Monks: Start by considering the case where exactly one monk has red eyes. What does he know? Now what if there are two of them? Generalize from there.

      (Answer to that, and the mother/child one below)

      SPOILERS

      SPOILERS

      SPOILERS

      SPOILERS

      SPOILERS

      SPOILERS

      Brown/Red Eyed Monks: If there's one red-eyed monk, he'll look around and see that nobody else has red eyes. Since at least one monk must have them, it must be himself. So Alan kills hiself at midnight.

      Now, if there are two red-eyed monks, they each see the other, and expect him to kill himself at midnight. When that doesn't happen, they both realize that there are two of them, the other (which they can see) and themselves (which they've just deduced). So they kill themselves at midnight on the second day.

      In general, if there are N red-eyed monks, they'll kill themselves after N days.

      As for the mother/child problem, it's simple algebra. If x is the age of the child, then x+21 is the age of the mother, so

      (x+6)*5 = ((x+21)+6)

      Solve that for x = -3/4 years, so the child is 9 months shy of being born.

      --
      The most valuable commodity I know of is information. - Michael Douglas as Gordon Gekko, Wall Street
    2. Re:Argh! by NigelJohnstone · · Score: 1

      Now suppose there are 3 red eyed monks.

      A B and C

      At midnight nobody kills themself.

      A thinks B isn't killing himself because of C
      A thinks C isn't killing himself because of B

      C thinks A isn't killing himself because of B.
      C thinks B isn't killing himself because of A

      B thinks A isn't killing himself because of C
      B thinks C isn't killing himself because of A

      So they live happily together.

      Now I know that this must have been looked at deeply and not just my twenty seconds of late afternoon brain cells.
      So what did I miss?

    3. Re:Argh! by NigelJohnstone · · Score: 1

      Oh, never mind, I see now.

      The monks 'A's desire to kill himself in case he has red eyes is so strong that when C & B don't kill themselves, he eventually assumes there must be someone else with red eyes. Therefore he kills himself.

      Oh wait that doesn't make sense, if it did they would kill themselves before the tourist came along, because he told them something everyone already knew.
      They knew there were monks with red eyes, they knew nobody was killing themselves and they knew already that there was at least one of the them with red eyes. So the tourist simply told them what they already knew.

      So suppose you were in an interview and asked this question and you answered the way I just did. Would I get the job?

    4. Re:Argh! by x1048576 · · Score: 1
      The monks 'A's desire to kill himself in case he has red eyes is so strong that when C & B don't kill themselves, he eventually assumes there must be someone else with red eyes. Therefore he kills himself.

      Oh wait that doesn't make sense, if it did they would kill themselves before the tourist came along, because he told them something everyone already knew. They knew there were monks with red eyes, they knew nobody was killing themselves and they knew already that there was at least one of the them with red eyes. So the tourist simply told them what they already knew.

      But the reaction of the other monks then tells them more.

      Suppose there are just two monks, both red-eyed. They don't kill themselves because they don't know their eye colour. The tourist makes his unfortunate remark. Now if monk A had green eyes then monk B would know that he himself must have red eyes so he would kill himself that night.

      So, when monk B doesn't kill himself, monk A learns that he himself has red eyes and kills himself on the second night. (And so does monk B, who has also learned that he has red eyes.)

    5. Re:Argh! by oGMo · · Score: 2

      I'm not sure about the first problem, since it would work out fine with one monk with red eyes, further cases of course present problems.

      The second I think you're right. The only other alternative (besides "I don't know") is "six feet under," but if you do a little math, your answer seems correct:

      M_a = C_a + 21
      M_a + 6 = (C_a + 6) * 5

      Do the math (where M_a is the mother's age, and C_a is the child's age, of course), and the child comes out to be -3/4 of a year old. Which indicates you're probably right.

      --

      Don't think of it as a flame---it's more like an argument that does 3d6 fire damage

    6. Re:Argh! by MrScience · · Score: 1

      You are right (first link). Just use Google. :)

      --

      You quitting proves that the karma kap worked. The most annoying of the whores shut up. --CmdrTaco

    7. Re:Argh! by NigelJohnstone · · Score: 1

      If there is more than one person, the tourist tells them nothing they don't already know.

      Since they already knew there was at least one person in the group with red eyes and lived without any suicides, he's changed nothing.

      I think it falls apart at 3 red eyed people.
      Each can see 2 other red eyed people, each waiting for the other to commit suicide.

    8. Re:Argh! by wunderhorn1 · · Score: 2
      I think it falls apart at 2 monks.

      The tourist said that at least 1 monk has red eyes. If there is only one red-eyed monk, this statement is notable because the one red-eye now looks around and sees that no one else has red eyes.
      If there were two red-eyed monks, the fact that there is at least one red-eye would already be known. Each red-eyed monk would already noticed the other, and any scenario where the two monks wake up the next morning and realize it's them would have played itself out earlier.

      Do I get them job now? ;-)

      --
      Karma: Bored. (Thinking about resurrecting the "Anyone else is an imposter" joke.)
    9. Re:Argh! by Aliks · · Score: 1

      The tourist does add new information because he tells everyone that the case of a single red eyed monk is now untenable.

      Suppose there are 3 monks with red eyes and you are one of them. You look round and see 2 other red eyes, so you know that there are either 2 or 3 red eyes in total on the island (you aren't sure about yourself)

      You now try to work out what is going on in the mind of the other red eyes. Depending on what they can in your eyes they will be counting at least 1 and maybe as many as 3 red eyes in total on the island.

      After the first midnight passes without incident, it becomes clear that the other red eyes must actually be seeing at least 2 red eyes on the island so that means that you yourself are red eyed. You decide to commit suicide at midnight.

    10. Re:Argh! by wunderhorn1 · · Score: 2
      The tourist says (I just went back and checked), "At least one of you has red eyes."

      First, how does that make the case of a single red eyed monk untenable? Second, how does the scenario you lay out in the last 3 paragraphs depend on what the tourist said?

      --
      Karma: Bored. (Thinking about resurrecting the "Anyone else is an imposter" joke.)
    11. Re:Argh! by JPelzer · · Score: 1

      > And finally, 0.999999... is not 1.0000000.... really it's not, though in practice, well...

      .999999... DOES eqal 1.0:
      See if my math holds up...

      x = 0.999
      10x = 9.999
      10x - x = 9.999 - x
      9x = 9.999 - 0.999
      9x = 9
      x = 1
      Going back to the starting equation:
      1 = 0.99999

    12. Re:Argh! by Aliks · · Score: 1

      First, how does that make the case of a single red eyed monk untenable?

      I mean that everyone on the island now knows that if there were a single red eyed monk then he would have to commit suicide at midnight that very night.

      Before the tourist spoke everyone could look around all they wanted and still draw no conclusions if all they could see was a single red eye. After the tourist spoke, and after the first midnight further conclusions could be drawn.

    13. Re:Argh! by abusimple · · Score: 0

      Close - but you're a night off if I'm thinking right. As someone pointed out above, everyone kills themselves on the Nth Night (where there are N Red-Eyed Monks). I'm, of course, assuming that since these monks have nothing better to do all day, they'll think about this a lot and therefore be 100% rational (as in Game Theory).

      Case 1:
      1 Red-Eyed Monk (A)
      _Day 1_
      A: "I See No Red-Eyes Monks!"
      _Night 1_ A KILLS HIMSELF

      Case 2:
      2 Red-Eyed Monks (A, B)
      _Day 1_
      A: "I See 1 Red-Eyed Monk (B). B sees 0 or 1(Me)"
      B: "I See 1 Red-Eyed Monk (A). A sees 0 or 1(Me)"
      _Night 1_ NOTHING HAPPENS

      _Day 2_
      A: "B did not kill himself. B saw 1 Red-Eyed Monk(Me). I have red Eyes"
      B: "A did not kill himself. A saw 1 Red-Eyed Monk(Me). I have red Eyes"
      _Night 2_ A, B BOTH KILL THEMSELVES

      Case 3:
      3 Red-Eyed Monks (A, B, C)
      _Day 1_
      A: "I See 2 Red-Eyed Monks (B,C). B sees 1(C) or 2(Me,C). C sees 1(B) or 2(Me,B)"
      B: "I See 2 Red-Eyed Monks (A,C). A sees 1(C) or 2(Me,C). C sees 1(A) or 2(Me,A)"
      C: "I See 2 Red-Eyed Monks (A,B). A sees 1(B) or 2(Me,B). B sees 1(A) or 2(Me,A)"
      _Night 1_ NOTHING HAPPENS

      _Day 2_
      A: "If B saw 1(C), C saw 1(B) and I have Brown Eyes. Therefore they will kill themselves tonight." [See Case 2:]
      B: ""
      C: "" [I'm getting damn tired of writing this. Someone could write a teeny little program that does all this]
      _Night 2_ (3 Red-Eyed so...) NOTHING HAPPENS

      _Day 3_
      A: "B, C did not kill themselves. Therefore each saw two(Me,C|B). Therefore, I have Red Eyes."
      B: ""
      C: ""
      _Night 3_ A,B,C ALL KILL THEMSELVES

      Case N: ...
      _Night N_ A,...,"N" ALL KILL THEMSELVES

      --Not that anyone will see this since my Karma is officially "BAD"

    14. Re:Argh! by abusimple · · Score: 0

      As Above, 0.999...=1

      The easy answer:
      Think of a number between 0.999... and 1
      Can't do it? Don't feel bad, no one can. Since there is no number between 0.999... and 1, they are not distinct from one another and must be the same number (think of how you would order them, neither is less than the other...).

      The harder way:
      Didn't everyone do this at some point?
      Say I want to represent the number above the "^" on the following numebr line going from 0 to 1.


      |----|----|----|----|
      0---.25-^.50--.75---1

      [I hope that came out right...]

      One way to do this is to divide the line in half. If the number falls below this division (left) write a "0" in the first place after the "decimal" point, if it's above (right), write a "1"
      So... ".0"

      Now divide this new subinterval in half again. Again write "0" if the number is in the left half, and "1" if its in the right
      So... ".01"

      Keep going to represent the numebr in a sort of binary format (I'm not a CS person, is there a real name for this?).
      So... ".0110..."

      But what happens if the number you want happens to fall exactly on a dividing line, say on the line corresponding to .25
      So... ".0?"

      Is it "?" a "1" or a "0"? To take care of this you can define your procedure a bit better:
      "0" if in [Left_End,Mid_Point), "1" if in [Mid_Point,Right_End].
      So... ".0100000000..."

      But that's just as arbitrary as:
      "0" if in [Left_End,Mid_Point], "1" if in (Mid_Point,Right_End]. (Mind the difference between "(" and "[").
      So... ".0011111111..."

      Since the procedural difference is arbitrary, the numbers are EXACTLY the same. Extending this into real decimal is trivial: just use 10 divisions instead of 2 every iteration.
      Thus, 0.999...=1.000...

      --Not that anyone will see this since my Karma is officially "BAD"

    15. Re:Argh! by NigelJohnstone · · Score: 1

      Not quite,

      the problem is the puzzle author added some 'fixups' which cause problems:

      Firstly the tourist. In the case of more than 1 red eye the tourist adds no extra information. It seems to have been added to fixup the single red eye case.

      Secondly the justification for the tourist was that everyone was living happily until he came along. Again, do your test with 2 red eyed monks but no tourist.
      With or without the tourist they have to kill themselves, unless you say that at the population the monks were at, there is so little pressure to kill yourself that they were happy. i.e. N was so long it nobody could be bothered to keep track.
      But that same condition exists AFTER the tourist tells them.

      Then there was the midnight thing. If they don't kill themselves in synchronoisation the puzzle falls apart. Hence the 'kill yourself at midnight' fixup was added.

      Perhaps he would have been better if he had made the puzzle:

      A group of mixed red-eye'd brown eye'd monks discover a sacred scroll. The scroll says that red-eye'd monks must take the one sacred sword and kill themselves within the day. ...stuff about no mirrors, and no talking...
      There are more than one monk with red eyes.
      What happens and why?

      Answer. Eventually all red eyed monk kills himself.

      Reason:
      Only one person can kill themselves at a time courtesy of the single sword,
      there is 1 unit more pressure to kill yourself if you have red eyes than brown eyes because you can see one less red eyed person than a brown eye'd person.
      So red eyes will tend to kill themselves when they see no other red eye kill themselves. At worst no later than N days.
      The final red eyed monk kills himself because the second from final red-eyed monk took an extra day too long to kill himself. Indicating that he saw another red eye monk which must be the final one.

      That I think works.

  96. PARC prior art Re:"Microsoft... responsible" NOT! by kris_lang · · Score: 1

    I don't think so.

    These type of "brain teasers" were just as common in 1985 during the interviews for internships at XEROX PARC when I was at MIT as a 6.1/6.3 Junior. IBMs interviewers also asked a brain teaser but HP did not, if I remember correctly.

    Any other prior art that others can remember from the ancient days???

    --- why has Karma become Qualitative instead of Quantitative?

  97. Why I never asked riddles.... by rufusdufus · · Score: 5, Informative

    I did a lot of interviews at MS when I was there, and I quickly learned not to ask riddles. First off, it makes people who don't get them uncomfortable and angry. Second, it doesn't actually show that the person can write software.

    I used a much simpler approach, so simple most people think its silly. But thats the point; nobody leaves the interview thinking they were tricked or duped. I always started with implementation of strcpy(). Half of the candidates failed right there! They took most of the hour to get it right (or not), but were able to see point-blank that they were not ready for the job.
    Next, I would ask about crashing cases, and if they figured out overlapping memory locations, have them write a 'fixed' version. This weeded out another big chunk. After that, I went into some color counting algorithms.
    I stayed well withing the field of what the candidate would expect, and did not try to trick him or make him nervous with off the wall riddles.

    This approach worked great, and didn't leave anyone feeling robbed and abused. The ability to solve riddles *is* an indicator of how smart the person is, but it is *not* an indicator of how good a programmer they will be.

    1. Re:Why I never asked riddles.... by mcjulio · · Score: 1

      QED: a primary skill for Microsoft employees is reimplementing strcpy(). ...and 30,000 security holes smack their heads as a gigantic light bulb clicks on.

    2. Re:Why I never asked riddles.... by Krazy_in_Normal · · Score: 0

      Q: How much wood could a wood chuck chuck if a wood chuck could chuck wood? A: A wood chuck would chuck all the wood he could chuck if a wood chuck could chuck wood.

    3. Re:Why I never asked riddles.... by Rupert · · Score: 1, Offtopic

      Some people get uncomfortable or angry. Others think about it and say they don't know. Others start drawing on the table. This can tell you a lot about the person.

      I prefer to pose open-ended questions. One of my all time favourites was actually asked of me: you have been asked to implement the back end of an online game of Monopoly in C++. Discuss.

      --

      --
      E_NOSIG
    4. Re:Why I never asked riddles.... by rufusdufus · · Score: 2

      No. A *necessary* skill is for MS engineers to be able to implement strcpy(). The question is a filter for candidates who, with a BS or even an MS with all the right stuff on their resume who cant code at all. As I said, most candidates fail, even though as noted above, the canonical strcpy() is one line of code.
      Completing the rest of the interview is of escalating difficulty where the color counting problem gets arbitrarily sophisticated. By the end I will know how competent *and* how smart the person is.

    5. Re:Why I never asked riddles.... by null-sRc · · Score: 1

      "...it makes people who don't get them uncomfortable and angry..." OK. Let me get this straight. People actually got angry when you asked them to think about a few riddles?? This would prove that riddles are a VERY effective way of rooting out the uncapable... if you get "angry" over a stupid little riddle at an interview, then maybe you shouldn't be applying to be a programmer... *stomps out of the interview enraged by all dem dare riddley doos*

      --
      -judging another only defines yourself
    6. Re:Why I never asked riddles.... by rufusdufus · · Score: 2

      Oh yeah, those people are "no hire". However, I don't need to rub it in their face. They will fail in the less aggressive interview as well. They will just feel better about the failure, and not come onto slashdot posting how microsoft is full of bs and hate them forever.

  98. Here's a riddle for you! by catmaker · · Score: 1

    If I have a donkey in one hand, and another donkey in the other hand, and a donkey on each shoulder and a donkey in my trousers pocket and a donkey in my car, what do I have?

    --
    status is failure. status is failure
    1. Re:Here's a riddle for you! by Juggler+cant+juggle · · Score: 1

      Some donkeys? I'm right aren't I? You've got D0NK3YS!

    2. Re:Here's a riddle for you! by catmaker · · Score: 1

      Oooh, it's good. I hadn't thought of that!

      --
      status is failure. status is failure
    3. Re:Here's a riddle for you! by catmaker · · Score: 1

      Oh! I forgot to say! One of the donkeys is wearing a jumper. It doesn't matter which one.

      --
      status is failure. status is failure
    4. Re:Here's a riddle for you! by catmaker · · Score: 1

      I think the actual answer is 'HUNDREDS OF DONKEYS' but it might not be. I've forgotten.

      --
      status is failure. status is failure
    5. Re:Here's a riddle for you! by wichtolosaurus · · Score: 1

      You probably have an e-donkey-node running. Watch out, your AOL flatrate might get cut off.

    6. Re:Here's a riddle for you! by Anonymous Coward · · Score: 0

      Um, more asses than you can handle?

    7. Re:Here's a riddle for you! by elveu · · Score: 1

      a rather strong person with a really big trouser pocket and little room left in their car

  99. reading the question is required. by leuk_he · · Score: 2

    Write a subroutine

    quite an interesting language you chose to write it in.

    The point is: reading the question correct is half the answer. You got only 50% correct.!

    1. Re:reading the question is required. by Enonu · · Score: 2

      I hope you never become a professor. My solution is language agnostic since it's defined mathematically. I'll take your 50% proudly.

  100. got to read /. by Anonymous Coward · · Score: 0

    + 1 funny. +1 AC

    I'm quite sure it is a guy, a lady would not have to post as "anonymous coward".

    -- ac --> Male

  101. I'm going to hell by deadline · · Score: 1

    There is link to a web site in the hard problems rockdead that is really funny. At the bottom I chose death (Sorry, but I really like the Allman Brothers) and then I chose to reject Jesus (but I did like Jesus Christ Superstar), then I ened up at one of hell's best web pages. They even have recordings from hell! It is somewhere under Finland.

    I think I'll go listen to the live version of Wip'en Post.

    --
    HPC for Primates. Read Cluster Monkey
  102. There is no 'right' answer by Martin+Spamer · · Score: 2

    'The thing that drives me nuts is not having the "right" answer to check my answers against.'

    The point is there is no *single* right answer, sometimes there multiple good answers, sometimes there are none. The point of the question is to examine the candidates problem solving ability, the ability to think under pressure and produce new answers and sometime the ability to be honest and say I don't know the correct answer. Sometimes the test is will you challenge somebody in obvious authority if they are talking b*ll*cks and can you do it diplomatically. Indeed you answer to this problem indicates [to me] you tend to apply cargo cult type solutions. You want to parachute in the correct answer without understanding why it is the 'correct' answer.

  103. back fire. Re:Infuriating,,, by leuk_he · · Score: 1

    I don't think that is a solution. If you create a back fire you will have to pass the line of fire you just created. If you can do that you can just move to point B when it stopped burning. Creating an extra fire is just trouble.

    Same point as first poster. You create some extra variable "you can pass the fire.". if you don't tell this to the person that ask the question he can say "oke" or not oke. It will not tell anything about you.

    I never had to answer this kind of questions on a interview. A strong cv did do the most work. If you ask THEM question thya can not ask you questions

    1. Re:back fire. Re:Infuriating,,, by Anonymous Coward · · Score: 0

      You don't need to pass the fire. Point A is burning, the next 10 miles are fine. Willy is ahead of the fire somewhere (required by the '10 hours to point B' statement). If he was behind it then it would make no sense, he'd be safe.

      He can start a fire at say the 5 mile mark and hang around behind that one (doesn't need to pass it, he just starts it between him and B). The fire at A doesn't reach this point until 5 hours later, just as his fire reaches B, so there's 5 miles of space (give or take a little warm area round the edges, and some still smouldering forest in the middle) to hang around in.

  104. Incense riddle - a different approach by Anonymous Coward · · Score: 0

    Ah, I tackled this differently.

    Break one stick in half. (It won't be perfectly accurate but you can make a pretty good measurement using your bare hands. Besides, any self-respecting ./er is going to have a ruler with them...) Break one of the halves in half, so you have a quarter stick.

    Using that quarter stick as a measurement, break 1/4 off one of the other sticks.

    Bin the half stick and the three 1/4 sticks, or smoke them, or whatever.

    Light the full stick. It will burn for one hour. As it goes out, light the remaining 3/4 stick. When it goes out, 1:45 has elapsed since you lit the first one.

    Sure, it takes a while to prepare, but it's probably within the margin of error - and besides, the question didn't say I had to measure 1:45 from now, did it? :)

  105. Re:TWO CONDOMS, THREE WOMEN ANSWER by Anonymous Coward · · Score: 0

    ANSWER: DON't HAVE SEX WITH THE LAST WOMAN. Just because the question states that he "would like to" doesn't mean he MUST.

  106. Re:PARC prior art Re:"Microsoft... responsible" NO by Destoo · · Score: 2, Funny

    >Any other prior art that others can remember from the ancient days???

    The Sphinx.

    'nuff said.

    --
    Nouvelles de jeux et technologies en français. TC
  107. Official answer is correct by theLOUDroom · · Score: 1

    The correct answer is that manhole cover are round so they don't fall in.
    This crap about the shape of a wankel rotary engine is just that, crap. Of course you could make it in the shape of a star, rotoary engine, cartman (he's pretty round), whatever. There are other shapes that would fall though, but that doesn't mean that the way it is right now doesn't work.
    As for all those square manhole covers, they are either hinged or very rare, and irrelevant to the question (Assuming the question is: Why are manhole covers round?).
    The can be additional reasons/benfits, like the fact that most pipes are round, and being easy to roll, but not falling in seems like the best answer to me.
    To say that there is not reason is silly. At some point someone man a decision to produce round manholes and cover for them. People actively choose to contiune to produce them. They could choose to make them a different shape if they wanted to.
    Also, using fixed size buffers for user input is okay, and should be done. You just have to check that the buffer doesn't overflow. If your program will just keep acccepting more and more data a user could consume all your RAM as a DNS attack. This is commonly checked for on web forms, otherwise someone could submit 1,000 web forms with a few megs of data each, and bring down a server. I'm not a CS major, but AFAIK it is almost always a good thing this to set a limit on the size of user input. Just make sure it's reasonable and it doesn't barf when someone tries to go above that limit.

    --
    Life is too short to proofread.
    1. Re:Official answer is correct by Anonymous Coward · · Score: 0

      I'm not a CS major,

      obviously

      but AFAIK which isn't much.

      the buffer overflows because the size of the buffer is too small to handle the supplied input. if you limit the amount of input passed into the buffer, then you're good. otherwise, you get yet another bug to be exploited by script kiddies who are just that much smarter than someone like you, albeit below the majority of CS people.

  108. Worst one ever... by dmorin · · Score: 2
    ...came from the dude who asked me, "Describe November." I kept asking him what the hell he was talking about, and he just kept repeating "Describe November" over and over again. When I finally said something about "Thanksgiving... leaves... fall... colors...." he was willing to move on to the next question. He later told me that he'd read somewhere that the question was good for determining true engineers because the engineers would respond mathematically (i.e. 11th month, 30 days...) whereas those that responded more descriptively were probably not good engineers.

    I got the job but only because a friend (this guy's peer) wanted to hire me. And, last time I checked, the guy who asked the question was still looking for work.

    One of my favorites to ask people is questions about languages they don't know. Stresses the concepts over the syntax. For instance, "You know OO programming, right? ok, Smalltalk is an OO language. Tell me a little bit about what it probably has." My favorite answer was from the college kid who had written Prolog on his resume because one of his courses did a week on it. I asked him to describe the language, and he couldn't, so I described it for him. Then I asked him to think about what uses the language might have, what applications it would be good for. He said, "none, I guess."

  109. It's not only riddles by subrama6 · · Score: 1

    This whole debate seems to assume that microsoft is hiring based on performance on these riddles. It's crazy to believe that they would hire someone who could tell you why a manhole cover was round if they couldn't write decent code. Microsoft position is that code isn't the hard part. They're much more interested in creative problem solving. Admittedly, the more websites there are like this (http://acetheinterview.com is the one my friends and i used to prep for m$ interviews) the opinion i've read that all these things are testing now is memorization. but by the time you do the day interview at microsoft, you're pretty much writing code and answering design questions all day long. the riddles are for screening.

  110. Um... no. by fizbin · · Score: 2

    What do you do when all three numbers are zero?

    Of course, the real way to do this is to build the triple redundancy into your memory unit, hardwire the logic (probably using one triple-input nand gate and three two-input nand gates for each bit) and not have the cpu deal with this at all.

  111. Re:Light bulb riddle [SPOILER] by bje2 · · Score: 2

    turn switch 1 on for 5 mins...turn it off...turn switch 2 on...go into the room...the lighbulb that is on is switch 2, the lightbulb that is off & warm is switch 1...the lightbulb that is off & not warm is switch 3...

    --

    "Facts are meaningless. You could use facts to prove anything that's even remotely true." - Homer Simpson
  112. Using riddles by DustMagnet · · Score: 2, Insightful
    I've given more interviews than I've taken. Once I asked a programmer a kind of programming riddle. It was a simple one to learn if he understood that readability was usually more important that optimization. (You know that don't you?)

    The guy freaked. He started complaining that it was unfair and things like that. The funny part was I wasn't judging based on what answer he gave, but how he answered the question. He could have done well, by just rambling about the tradeoffs between different answers. Hell, he could have picked any answer and still got the job, but to lose it over a single question. That was unacceptable.

    Where I work, things are often unfair. You can't freak out about it, or you're lost. He was the only person we interviewed for the job. We didn't hire anyone.

    --
    'SBEMAIL!' is better than a goat!!
  113. The Master Counter by Dan+Crash · · Score: 2

    I think the problem here, though, is that state changes will occur that not everyone sees, so their count will be off, and you run the risk of never getting out.

    Imagine you're picked for the first time on the 51st day. The light is off. How many people have been picked before you? You have no idea.

    (Well, you know at least two people have been picked, but perhaps the warden's been alternating between those two for the past 50 days. But on the other hand, 50 people could have been out. If so, and you started your state-change count at two now, you'd never reach 100.)

    Without some accurate way of counting, no one can be sure they've seen all the state changes, and so no one can say with positivity that all 100 people have been out. You end up with a prison full of people with inaccurate counts waiting to reach a number that never comes. Right?

    --
    He who refuses to do arithmetic is doomed to talk nonsense.
    1. Re:The Master Counter by CProgrammer98 · · Score: 2

      As with all these puzzles, you have to make assumtions...
      (1) All the inmates can see the bulb.
      (2) They can all count and remeber the count
      (3) They will all witness each state change
      (4) The next guy only flips teh switch if he has never done so before

      so, whenever the light goes on, or off, they add 1 to their counter. When it gets to 100, they're free.

      --
      And the people shall be oppressed, every one by another, and every one by his neighbour Isaiah 3:5
    2. Re:The Master Counter by Anonymous Coward · · Score: 0

      No, You can't assume that everyone can see each state change or see the bulb. That is what makes the problem non-trivial.

    3. Re:The Master Counter by Anonymous Coward · · Score: 0

      Under your assumptions, your solution works.

      Now try these assumptions:

      (1) Only the inmate currently in the living room can read the state of the bulb.
      (3) Only the inmate currently in the living room can witness a state change.

      I share your assumption (2), that each prisoner can count and remember counts. The problem becomes harder if no prisoner has counters (there is still a solution, one prisoner has to have a state machine with 200 states ... but he has no counter).

      Your assumption (4) is not an assumption about the problem conditions (the jail's requirements) at all. It is part of your solution algorithm (your design).

    4. Re:The Master Counter by Dan+Crash · · Score: 2

      What the other guys said. If you're told you're going to be held in solitary confinement, you shouldn't assume there's going to be windows in all of them, which is what your solution requires. I'd say your first and third assumptions aren't supported by the problem.

      However, your post made me realize that you should encourage everyone to prepare to count, not just the Master Counter. The Master Counter is the only one assured of seeing every state change, but there's a possibility that the first or second light flipper may witness every state change, too. They just have to count how many times they see the light cycle from off to on. If they see it cycle 99 times, they know that all 100 people have been out, and are simply waiting for the Master Counter's cell to be chosen again. They can save everyone the wait and demand their freedom that day.

      --
      He who refuses to do arithmetic is doomed to talk nonsense.
    5. Re:The Master Counter by CProgrammer98 · · Score: 1

      I gues syou copuld be right, I saw the phrase "central living room" and envisioned the cells placed around the room's perimiter. Though I would suspect that the light may show through the cracks between the door and the doorframes ??

      Interesting puzzle!

      --
      And the people shall be oppressed, every one by another, and every one by his neighbour Isaiah 3:5
    6. Re:The Master Counter by jeremycx · · Score: 1

      Here's my solution, though it's not practical (takes too long), it is a workable solution if you assume that the prisoners cannot see the light bulb from their cells.

      1. Number the prisoners 1 to 100
      2. Number the days, starting with the first day, each prisoner keeps count of what day it is.
      3. Prisoner number 1 is allowed to switch on the light if he arrives on a day that ends in "01"
      4. Each other prisoner will leave the light on if the day ends in the same digits as their personal number, else they will turn the light off.
      5. Prisoner number 100 can delare that all prisoners have visited the room if he arrives, the day ends in '00' and the light is on when he arrives.

      Eventually, all the prisoners will visit the room in order, and the last prisoner will see that the light has remained on through the entire sequence.

      Whew. I don't think this is the correct answer, because an unreasonable amount of time could elapse before this happens...

    7. Re:The Master Counter by Dan+Crash · · Score: 2

      Heh, yeah, this was my first solution, too.

      I knew it wasn't a great one, though, because the chance of all of you being picked in order is 1 in 1x2x3x4x5....x99x100, which calc.exe tells me is 1.0715102881254669231835467595192e-158. So you'd be in there a while. :)

      Still, it's a solution. So there's three ways I've seen so far. I'm working on a fourth. Boredom will do funny things to you. Maybe I identify with these prisoners too much.

      --
      He who refuses to do arithmetic is doomed to talk nonsense.
  114. Better interview question by fizbin · · Score: 2

    Favorite technical interview question I've ever heard:

    So you're working on a program using the foobarlib library and calling its function baz(), which according to the documentation returns an integer from 1 to 10 that means something or other. Suddenly, you discover that your program is blowing up because baz() is apparently returning -17. What do you do?

    The ultimate correct answer that this person was looking for is that you ask your colleagues for help. These days, of course, you also get credit for first searching the web and newsgroups relevant to the package. Surprisingly, many people give up after suggesting things ("Well, first I have my debugger trace everything very carefully to make sure that baz is really doing this, then I re-read the foobarlib documentation") and being told "Ok, you try that, and it doesn't work."

    Some people have actually told the interviewer flat-out that "that would never happen; it's impossible". However, those people have usually already demonstrated their unsuitability in other ways.

  115. Always check the obvious by Andy_R · · Score: 2

    I interviewed people for a DTP post that required people with knowledge of Quark Xpress and proofreading ability.

    About 70% of the applicants got the name of the package wrong on their CV ('express').

    --
    A pizza of radius z and thickness a has a volume of pi z z a
    1. Re:Always check the obvious by Megane · · Score: 2

      Are you sure it wasn't the fault of an idiot pimp^H^H^H^Hrecruiter? Maybe even a recruiter who used a spelling checker in idiot ("yes to all") mode?

      --
      #naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
  116. I'm envious, my question was too easy by Ex-Parrot · · Score: 2, Interesting
    When I interviewed for my current job, I was asked a riddle. It was nothing compared to these, though. I actually got it wrong on my first try (I started writing pseudo code to try to compute an answer, wasting lots of time), but he gave me a second chance. I got it right after I realized that I hadn't read the directions carefully enough. I looked, but didn't see it either here or on the riddle site. Here it is if you're interested:

    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
    1. Re:I'm envious, my question was too easy by CProgrammer98 · · Score: 1

      One - buy one from the machine labelled as "random" - if that gives you a coke, then the machine labelled coke gives pepsi and the 3rd is random.

      If it gives a pepsi, then the one labelled pepsi gives cokes and the other is random.

      --
      And the people shall be oppressed, every one by another, and every one by his neighbour Isaiah 3:5
    2. Re:I'm envious, my question was too easy by SablKnight · · Score: 1

      It's fundamentally the same question as the Apples + Bananas question on the Easy page, just requires more thought. I used to ask the Apples/Bananas question when I held interviews, but in the form you have (how many fruit do you need to remove...)

      I like the vending machine examples better, personally, though this is the first I heard that form.

      -SablKnight

    3. Re:I'm envious, my question was too easy by Ex-Parrot · · Score: 1

      Yeah, I saw that riddle shortly after posting my original comment. I think it works better with vending machines, too. The locked vending machine is easier to visualize than a magic box that lets you remove fruit, but won't let you open it or look inside.

      --
      To many, total abstinence is easier than perfect moderation. -- St. Augustine
  117. Link To Mirrors by cmdr_beeftaco · · Score: 1

    Here's a link to a bunch of mirrors

    1. Re:Link To Mirrors by wayne530 · · Score: 1

      http://wwwcsif.cs.ucdavis.edu/~huangy/riddles/intr o.shtml

    2. Re:Link To Mirrors by kilfarsnar · · Score: 1

      Wise guy...

      --
      "What the American public doesn't know is what makes them the American public." -Ray Zalinsky (Tommy Boy)
  118. Why I Failed My Microsoft Interview by JohnnyO · · Score: 2, Insightful
    I'm not sure if this question is on the page or not, as I can't access it. (Slashdot effect anyone)

    Anyway, during my Microsoft interview when I was an undergrad, they asked me the following question, which I got "wrong"

    You have a 7kg bar of gold (assumed rectangular). Your employee gets paid 1kg of gold a day for seven days (because apparently Microsoft people don't get the weekend off). What is the minimal number of cuts to make such that you can pay him 1kg every day?

    I came up with some creative solutions, such as:
    • Cutting in 3/4 section, stacking the sections, and recutting, so one cut breaks two pieces.
    • Cutting a cosine wave into the bar which just brushed the edges with period 7.
    • A whole bunch of other ideas, all of which were "wrong".
    Anyway, after much back and forth, he basically hinted away that the answer he wanted was to cut the bar into sections of 1kg, 2kg, and 4kg. Then you give him 1kg the first day, then on the second day, give him the 2kg and ask for the 1kg back, etc etc. (ie binary arithmetic basically)

    Personally, this seemed like the stupidest answer ever to me, in that you were making the assumption that your employee would a) not spend any of the gold you gave him and b) bring it back to work with him the next day.

    Long story short, I didn't get the job, but I think that it shows that people are too fixated on what they think is the "right" answer to something like this, when in reality, there are other solutions.

    I could also add some good natured Microsoft bashing about how they make stupid assumption like this in code, but then you wouldn't have anything to reply with :)

    1. Re:Why I Failed My Microsoft Interview by Fulcrum+of+Evil · · Score: 2

      You have a 7kg bar of gold (assumed rectangular). Your employee gets paid 1kg of gold a day for seven days (because apparently Microsoft people don't get the weekend off). What is the minimal number of cuts to make such that you can pay him 1kg every day?

      Zero. The pay period isn't specified, and weekly or biweekly intervals are normal. Besides, do you want to hire someone that earns 7kg/week, yet is living hand to mouth?

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
  119. Riddle me this by imadork · · Score: 2
    This is the story where all the Managers who read /. will show themselves!

    But seriously, I have no problem with these riddles in interviews, as long as they're used properly. The point of asking the question should not be to get a "correct" answer. It should be to see how people react under pressure, how creative and resourceful they are, and how flexible they can be in the presence of (possibly) incomplete information.

    Even someone who gets one of these answers "wrong" (perhaps because they overlooked some obscure point) would score points in my book if they could explain somewhat sound reasoning behind it and not get flustered while doing it.

    The best interviews I've had were right out of college, when the interviewer asked me about one of my grad school projects, then told me to explain it on a whiteboard, on the spot. Those were also the places I thought I'd most like to work at!

  120. Many sources by Anonymous Coward · · Score: 0

    They probably stole it from the movie Labrynth, whole probably stole it from someone else. IIRC, it was originally part of a small book of logical puzzles about an island containing "Knights and Knaves," which I think was the name of the book.

  121. real mirror by wayne530 · · Score: 1

    Here's a mirror of the riddles: http://wwwcsif.cs.ucdavis.edu/~huangy/riddles/intr o.shtml

  122. worthless shit by Anonymous Coward · · Score: 0

    In my interview they ask me this:

    1) Tell me about yourself.

    2) Do you have any question that you want to ask us?

    All these riddles are useless for my interview. I'll be impressed at anyone who can give a good answer to 1) and 2).

  123. tbe circular jail cell question by WebMasterJoe · · Score: 2

    from the site...

    How many prisoners found their doors open after 100 rounds? The answer of course, is none - after the first drunken round, the prisoners have awoken, left their cells, and are busy drinking at the nearest strip club.

    --
    I really hate signatures, but go to my website.
  124. Just be a smart ass by Uttles · · Score: 2

    I've never answered a riddle question correctly in an interview. I just act like such a blatant smart ass that the interviewer gets frustrated and or impressed with my attention to detail. In this way I have probably lost job opportunities, but you know what, I don't give a fuck. I didn't go to college and major in engineering, a major lacking any female contact, so that I could graduate and be asked to solve riddles. If an interviewer is going to waste my time by asking me stupid questions rather than asking about past real problems I've had to solve, projects, and accomplishments at other jobs, then they'd better be prepared for a barrage of equally stupid questions/remarks.

    --

    ~ now you know
  125. My answers by theLOUDroom · · Score: 1
    Here are my answers so far:
    • MARBLE JARS: Distribute them eveny between the 2 jars, assuming the guy will give you a jar at random or the worst of the two jars.
    • ARAB SHEIKH CAMELS: he told them to switch camels
    • 3 HATS: Guy A sees at least one black hat. Guy B see a white hat on C. If Guy B saw a white hat on C he knows his can't be white or else A would know that his hat is black. Thus Guy C knows that his hat is black.
    • HUMMINGBIRD: ( 5000 / (20 + 15) ) 25
    • FOOT SIZE IMPLIES SPELLING ABILITY: Foot size correlates with age which is correlated with spelling ability.
    • NONHOMOGENOUS ROPE BURNING: Light one rope at both ends. When this entire rope has burnt, 30 min have passed. Then, light the other rope at both ends and at the middle. When, this entire roep has burnt, 15 min have passed. 30 + 15 = 45
    • WILLYWUTANG AND THE BURNING ISLAND OF DOOM: I think there is a mistake in this problem. The wind should be going from B toward A. Th correct answer is to start another fire in between himself and the fire which the wind will them carry away from him and towards the other fire.
    • TWO COIN FLIPS: 50%
    • COIN MACHINE WEIGHING: Put one coin from machine 1, two from macine 2, etc. Take the difference from the expected weight and divide it by 1 oz to get the # of the broken machine.
    • HOURGLASSES: Run the 7 & 11 simultaneously. When the 7 is done start timing. When the 11 is done you've been timing 4 minutes. Flip it over and when it's empty you'll have 15.
    • LOGICAL SIGNS I: Open the silver chest.
    • LOGICAL SIGNS II: Open the bronze chest.
    • I don't feel like doin ASCII art for the chess problems.
    • CORK, BOTTLE, COIN: Push the cork into the bottle, then get the coin out.
    • FAMILY RELATIONS: His son
    • ANALOG CLOCK I: 0 deg or rad
    • ANALOG CLOCK II: 24 times/day, add n times 1:05 where n is an integer APPLES AND ORANGES: Look in the cate marked apples. It has to be either O or A&O. If it's O then the A&O crate is A and the O crate is A&O. If it's A&O then the O crate is A and the A&O crate is O.
    Maybe more may come later.
    Anybody have more/disagree?
    --
    Life is too short to proofread.
    1. Re:My answers by kilonad · · Score: 1

      the answer to the marble jars is incredibly easy if you're allowed to take them all out first. put the black ones on the bottom half of both jars, and the white ones on the top half. Voila.

    2. Re:My answers by tomk · · Score: 1

      You have some errors:

      NONHOMOGENOUS ROPE BURNING: you can't light a rope in the middle because the middle doesn't mean anything in context to time (because the rope is nonhemogenous). However you are almost right. You light one rope at both ends, and the other at one end, simultaneously. Then when the first rope is done burning, 30 minutes have passed. Light the other end of the other rope (which now has 30 minutes burn time remaining and is still lit) and it will burn up in 15 minutes. 30+15=45.

      BURNING ISLAND OF DOOM: Willy lights a fire on the B side of himself, say in the middle of the island. The wind will cause the fire to burn only towards B. When the fire has burned and cooled, he can step into the already burned area.

      ANALOG CLOCK I: actually, the minute hand is at 90 degrees, and the hour hand is at 90 + (360/12)/4 = 97.5 degrees, so the difference between the hands is 7.5 degrees.

      APPLES AND ORANGES: the problem states that you may only take one fruit from the crate; you can't see all of the fruit in the crate, so your solution won't work. To solve this you must take a fruit from the A&O crate. If it is an apple, this crate is A, the A crate is O, and the O crate is A&O. If it is an orange, the A crate is A&O and the O crate is A.

  126. My favorite by sharkey · · Score: 2

    Alive without breath,
    As cold as death;
    Never thirsty, ever drinking,
    All in mail never clinking.

    --

    --
    "Outlook not so good." That magic 8-ball knows everything! I'll ask about Exchange Server next.
  127. Because Manholes, Wells, and Tunnels are round by scotpurl · · Score: 2

    Manhole covers are round because manholes are round. Manholes are round because the tube shape naturally resists the crushing pressure of the ground surrounding it.

    It is for this reason that very old water wells (like in Africa and southern Asia) are round. The rocks you form the walls with resist compression quite well (pun unintended), and you get a sturdy, low-maintenance water source.

    Most of the old wells I've seen have rectangular covers, but the ones that people walk over have round covers so that the edge sits flush with the surrounding ground. Most of the flush-mounted ones are in built-up cities (like old London), and I imagine that the local barrel maker manufactured those as well. The edge of these is a row of stone/cobble that's set deeper into the ground than the surrounding cobblestone street.

    I think the modern answer (of geometry and axes) is quite boring, and ignores history and tradition too much.

  128. This is what I used for interviews by Bodhammer · · Score: 2, Interesting
    I used this last year as a interview techique for Semiconductor Applications engineers - EE's and embedded programmers. I gave them about 2 1/2 hours and 1/2 hour to talk about it and then I took them to lunch.

    ------ 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."
  129. Marble Jars by Anonymous Coward · · Score: 0

    Marble Jars:
    Distributing the marbles evenly between the jars, you get:

    Jar 1: .5*50%=.25
    Jar 2: .5*50%=.25
    Sum(chance of survival)=.5

    If jar is selected from randomly and uneven distribution allowed, I'd leave one white marble (i.e. you get to live) in one jar, and the remainder of the marbles in the other jar.

    Jar 1: .5*100%=.5
    Jar 2: .5*49/99=.2474
    Sum(chance of survival)=.7474

  130. Duh, here is an MSDN quote, dude : by Anonymous Coward · · Score: 0

    > The behavior of strcpy is undefined if the source and destination strings overlap.

    Hence canonical

    while (*p++ = *q++);

    will do :-p

  131. Yeah, I screwed that one up. by MillionthMonkey · · Score: 2

    Guess I won't be interviewing candidates at Microsoft!

  132. Well you obviously don't... by WIAKywbfatw · · Score: 2

    I interviewed people for a DTP post that required people with knowledge of Quark Xpress and proofreading ability.

    About 70% of the applicants got the name of the package wrong on their CV ('express').


    Err, the package is called QuarkXPress, not Quark Xpress, QuarkXpress or any other derivative. One word, only one 'e' and with the 'q', 'x' and 'p' capitalised.

    By the way, do you know how to spell irony? I bet you do...

    --

    "Accept that some days you are the pigeon, and some days you are the statue." - David Brent, Wernham Hogg
    1. Re:Well you obviously don't... by Frymaster · · Score: 1
      more embarassing is that i worked at a newspaper that ran an ad for people with experience in (wait for it) QuarkZPress.

      damn typos.

      mind you, a year earlier they left the "f" out of "shift work required".

  133. Open Door = Closed Door by Anonymous Coward · · Score: 0

    1/2 Open Door = 1/2 Closed Door

    Right?
    Now cancel the 1/2 on each side to get:

    Open Door = Closed Door

    Where is my logic flawed?

  134. How you should really interview by bruckie · · Score: 2

    One of interview methods that makes the most sense to me is described in the The Guerrilla Guide to Interviewing.

    Interviews should determine two things: whether a person can do the job, and whether they will do the job. Riddles don't really figure into either of those.

    --Bruce

    --
    There are 10 kinds of people in the world: those who understand binary, and those who don't.
  135. Re:Microsoft interview questions - Answer? by Anonymous Coward · · Score: 0

    what's the answer?

  136. Riddles?? by krinsh · · Score: 1

    If I were ever asked a riddle in an interview; unless it were for a riddle-writing position; I'd immediately stand up and leave. Interviews gauge your ability to perform a job; tests/certifications/etc. gauge your aptitude to perform certain tasks. Were I give a 'real-world' problem that I'd be likely to encounter on said job and asked to provide a solution, that would be a different story.

    This is just as unethical and likely illegal as the "do you think lying is ok?" 'personality' quizzes often given by temp agencies and the like. Being asked ethics questions for a position of responsibility is a different story, however.

    --
    I think with the interesting people, their lives can't possibly be wrapped up into a nice little package.
  137. What am I doing wrong... by Mustang+Matt · · Score: 2

    Admittedly, I'm not very good at math, but here's what I've come up with...

    If I remember my geometry correctly area of a square is (base x height) and a triangle is (base x height / 2)

    Big Triangle: 5x9.5cm Area: 23.75
    Small Triangle: 7x3.5cm Area: 12.25
    Dual Triangle: 5x9.5 and 2x5 Area: 28.75
    Square: 3x3 Area: 9
    Square Triangle: 5x4.5 and 2x4.5 Area: 27

    Total Area: 100.75cm
    Sqrt: Approx: 10cm

    Am I right so far?

    I'm still not getting it.

    --
    The man who trades freedom for security does not deserve nor will he ever receive either. - Benjamin Franklin
  138. U2 Riddle by schmaltz · · Score: 2

    I dig the challenge of riddles. Far worse are the syntax quizzes! Knowing about semicolons after function declarations or 'else' is the compiler's job and not a strong indicator of creativity or capability in a programmer.

    The riddle:

    "U2" has a concert that starts in 17 minutes and they must all cross a bridge to get there. All four men begin on the same side of the bridge. You must help them across to the other side. It is night. There is one flashlight. A maximum of two people can cross at one time. Any party who crosses, either 1 or 2 people, must have the flashlight with them. The flashlight must be walked back and forth, it cannot be thrown, etc. Each band member walks at a different speed. A pair must walk together at the rate of the slower man's pace:

    * Bono: - 1 minute to cross
    * Edge: - 2 minutes to cross
    * Adam: - 5 minutes to cross
    * Larry: - 10 minutes to cross

    For example: if Bono and Larry walk across first, 10 minutes have elapsed when they get to the other side of the bridge. If Larry then returns with the flashlight, a total of 20 minutes have passed and you have failed the mission.
    ---
    Another:

    You are given 10 baskets. 9 of the baskets each have 10 balls weighing 10kg per ball, however one basket has 10 balls weiging 9kg each. All the balls and baskets are identical in appearance. You are asked to determine which basket contains the 9kg balls. You have a suitable scale, but may only take a single measurement. No other measurements may be taken (like trying to determine by hand). You may remove balls from the baskets but may still only take one measurement. How do you do it?

    --
    Big Daddy, Johnny, Burp, Aunt Zelda, Scott, Slurp, Big Momma ... where's Siggy?
  139. My riddles page... by epsalon · · Score: 2

    I have put up my own little riddles page. Time for a little slashdotting... ;)

  140. my stab at a proof by invictus · · Score: 2, Informative

    000 0
    001 0
    010 0
    011 1
    100 0
    101 1
    110 1
    111 1

    (a & b) | (a & c) | (b & c ) | ((a & b) & c))

    Karnaugh Mapping...
    'a'b 'a b a'b a b
    c _ x x x

    'c _ _ _ x

    so the simplifications that can be made....

    (c & (a | b) ) | (a & b)

    there are no other 'little circles' that can be made on the map (as my EE101 prof was so fond of saying) therefore there are no further simplifications.

    --
    --Ks9
    1. Re:my stab at a proof by invictus · · Score: 2, Informative
      ack. that got all messed up... (well the map anyway)
      well, i cant seem to get it to line up... lets see it this way...
      .
      -.|a'|a'|a.|a.|
      -.|b'|b.|b'|b.|
      --+--+--+--+--+
      c.|..|x.|x.|x |
      --+--+--+--+--+
      c'|..|..|..|x.|
      wow, that was a PITA
      --
      --Ks9
    2. Re:my stab at a proof by po8 · · Score: 1

      OK, very nice clean proof that just & and | won't
      work. Does allowing yourself & | ^ + - help?

    3. Re:my stab at a proof by invictus · · Score: 1

      unless you have some insight into this, im not seeing how the additional operators would do it.

      --
      --Ks9
  141. ? Re:One from Lewis Carroll (well- Charles Dodgson by ASeed · · Score: 1

    Why such an extrange answer?
    r u crazy?

    Explain your answer...

    --

    --
    ACid
  142. Bingo! Nice Solution by ASeed · · Score: 2, Insightful

    I would call it "the Bingo solution"...

    - You are asuming that everyone has paper and pencil (or similar instruments).
    - They have to be careful (not to loose the count of the days so that incorrect info is transmited)
    - If the prisoners were taken at a regular pattern, they would never go out, but the text says "Everyday, the warden picks a prisoner at random" so there in no regular pattern.

    The first days:
    In average, in the first 100 days one should be picked in his own day, so himself and the next one who visits the room know that he has been there. Both can tell about it if they are chosen in that day.

    The last dyas:
    Probably, the last days before freedom many of them have their "bingo cards" almost complete and they are waiting for the last to be chosen to visit the room in his own day.

    --

    --
    ACid
  143. How big is a gas station by rossdee · · Score: 1

    Maybe from the number of cars etc you could work out how many gas pumps there are in the US, but not all gas stations are the same size. some have multiple lanes and can cope with large numbers of cars simultaneously, and others are 2 or 3 pump mom and pop style operations (especially in small towns.)

    Gas stations sell other things besides gas and oil.

    1. Re:How big is a gas station by muffel · · Score: 1
      Of all the variables you have to guess (or maybe 'estimate' would be a better word here) the average gas station size should be the easiest one.
      Is it 1? Probably more. Is it 20? Probably less.
      My guess would be around 5. Probably wrong, but very unlikely wrong by an order of magnitude. Which is the point of the whole exercise.

      You are not expected to deliver some exact number. In fact the number you give as an answer is secondary. The interesting part for the interviewer is to follow how you came up with that number. (I.e. you should be thinking out loud. Otherwise you needn't bother answering at all.)

      --

      bla
  144. Thanks! by Dan+Crash · · Score: 2

    This is the elegant solution I was looking for. I started trying something like this but didn't get it quite worked out, so I tried another tack. I'm glad you figured it out.

    The only weird sort of problem with this solution is that if you are picked in order every day, you'll never leave. In fact, there are many orders in which numbers can be essentially "segregated" from each other, so that no one ever knows that everyone has already been picked.

    But if distribution really is random, then this is definitely the best strategy. It'll certainly be quicker than my Master Counter way. Thanks!

    --
    He who refuses to do arithmetic is doomed to talk nonsense.
  145. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  146. 100 Prisoners and a Lightbulb by Dan+Crash · · Score: 2

    They're being held in solitary confinement. There's no reason to assume they can all see the bulb every day. The Prisoner's and the Lightbulb is discussed more here.

    --
    He who refuses to do arithmetic is doomed to talk nonsense.
  147. Re:? Re:One from Lewis Carroll (well- Charles Dodg by Uttles · · Score: 1

    just a hunch

    --

    ~ now you know
  148. More of them by theLOUDroom · · Score: 1
    more answers:
    • STUPID: e
    • CLIMBING SNAIL: 5 days. They left the trick out of this one. They should've made it 21 meters.
    • 8-WAY CAKE SLICE: Cut it in half. Cut it in quarters. Line up all the quarters in a row and cut them in half.
    • CHESSBOARD SQUARE COUNT: 8 * 8 = 64,7 * 7 = 49, 6*6 = 36, 5 * 5 = 25, 4 * 4 =16, 3 * 3 = 9, 2 * 2 = 4 . Answer is 64+49+36+25+16+9+4+1
    • MONTY HALL SHOW: Always switch. This is a really famous problem. You can do the math pretty easily.
    • GLASS HALF FULL: Tilt it. The top of the water should reach the upper and lower edges at exactly the same time.
    • HANGING CHAIN: 0 feet
    BTW AC was right 'bout my 1st answer.
    --
    Life is too short to proofread.
  149. Re:? Re:One from Lewis Carroll (well- Charles Dodg by Kredal · · Score: 2

    43 days 8 hours 25 minutes

    They spend 24 days forming a union, demanding equal rights for black and migrant workers, spend another 4 days deciding what kind of bricks they should make the wall out of. 23 more days are spent trying to determine which company should provide the bricks for the wall, then they all rest for 8 hours (lunch break, you understand) and finish the actual construction of the wall in 25 minutes.

    Just like any gov't project.

    --
    Whoever stated that signature sizes should be limited to one hundred and twenty characters can just go ahead and kiss my
  150. THE MORAL OF THE STORY IS... by Anonymous+Squonk · · Score: 2

    Always carry at least three condoms with you at all times, in case you a cornered by a group of women who demand immediate safe sex.

  151. Worse than any riddle by Anonymous Coward · · Score: 0

    PHB: Uhh, where do you see yourself in 5 years?

    I was asked that in October. I leaned over the PHBs desk and said:

    "A fucking plane flew into my building 3 weeks ago. I don't think about the future too much."

  152. I'll reply to this one by gurensan · · Score: 1

    I got asked 'What does systems analysis mean to you?' in a f*@#ing interview once, right out of school. What the hell kind of stupid question is that? The next thing I remember is this guy asking if I know how to structure a query in Access.

    <rant>
    I need to ask you tech interviewers something - do you guys ever research what you're hiring for before you jump in thinking you know anything? Being interviewed by someone who asks questions like these is both embarrassing and assinine, in addition to a complete waste of both the propect's and your time.
    </rant>

    --
    You are all fartheads.
  153. *chuckle* by Ruthless_Advisorette · · Score: 1

    Nicely put, indeed.

  154. Evil King, poisoned wine by The_Spide · · Score: 1

    An evil king has 1000 bottles of wine. A neighboring queen plots to kill the bad king, and sends a servant to poison the wine. The king's guards catch the servant after he has only poisoned one bottle. The guards don't know which bottle was poisoned, but they do know that the poison is so potent that even if it was diluted 1,000,000 times, it would still be fatal. Furthermore, the effects of the poison take one month to surface. The king decides he will get some of his prisoners in his vast dungeons to drink the wine. Rather than using 1000 prisoners each assigned to a particular bottle, this king knows that he needs to murder no more than 10 prisoners to figure out what bottle is poisoned, and will still be able to drink the rest of the wine in 5 weeks time. How does he pull this off?

    SOLUTION: (Think binary)

    10 prisoners 2 outcomes
    0 = alive (not poisoned)
    1 = dead (poisoned)

    1000 bottles 10 prisoners 2^10 = 1024 ...

    each bottle is assigned a number 1..1000 this is convereted to binary.
    this binary determine which prisoner (1..10) drinks it

    eg:

    bottle num: 1 = 0000000001 is tested by prisoner #: 1
    bottle num: 2 = 0000000010 is tested by prisoner #: 2
    bottle num: 3 = 0000000011 is tested by prisoner #: 2, 1
    . .etc

    The number made by the 1s (dead) and 0s (living) is the binary number of the posioned bottle.

    1. Re:Evil King, poisoned wine by ASeed · · Score: 1

      Nice one,
      but we could change some bottle numbers and maybe avoid some deads:

      Let's see how many 1's in the unused numbers:
      1023: 1111111111 (no, don't use this one)
      1022: 1111111110 (9)
      (no need to change the numbers with 9 ones)
      (no bottle in 1-1000 has more than 9 ones!!)

      1020: 1111111100 (8)
      (can be changed with 0111111111 b = 511)
      1017: 1111111010 (8)
      (can be changed with 1011111111 b = 512+255= 767)
      1016: 1111111001 (8)
      (can be changed with 1101111111 b = 768+127= 895)
      1015: 1111111000 (7)
      (can be changed with 0111111110 b = 510)
      1013: 1111110110 (8)
      (can be changed with 1110111111 b = 896+63= 959)
      1012: 1111110101 (8)
      (can be changed with 1111011111 b = 960+31= 991)
      1011: 1111110100 (7)
      (can be changed with 0111111101 b = 509)

      1010: 1111110011 (8)
      (can't be changed for any worse, no more 8's to change)

      1009: 1111110010 (7)
      (can be changed with 0111111011 b = 507)
      1008: 1111110001 (7)
      (can be changed with 0111110111 b = 503)
      1007: 1111110000 (6)
      (can be changed with 0111101111 b = 495)
      1003: 1111101100 (7)
      (can be changed with 0111011111 b = 479)
      1001: 1111101010 (7)
      (can be changed with 0110111111 b = 447)

      My comment wouldn't be necessary if there were 1024 bottles but in that case the suggestion for the binary solution was evident...

      --

      --
      ACid
  155. Final Exam by Sax+Maniac · · Score: 2

    Jeez, folks, stop hiring such morons who can only answer trivia questions. All interviewees are worthless unless they can pass the Final Exam.

    --
    I can explanate how to administrate your network. You must configurate and segmentate it, so it can computate.
  156. Maybe dumb, maybe not dumb, that's not the point by Doubting+Thomas · · Score: 1

    In an interview, you get time to ask maybe a dozen questions of the interviewee.

    Every question counts.

    It doesn't matter how sure you are that a question is good, if it's controversial at all, you should throw it out without a second thought, because you're basing a significant fraction of your value judgment about a person on a question of arguable merit.

    Pick something else to ask about.

    At my company, we like to use programming questions that cover material every developer has to know, but won't use every day, and so generally will have to exert a little bit of quick thinking to accomplish. Like writing a hash function (any hash will do), collection classes, clone methods, or nontrivial synchronization.

    --
    Just because it works, doesn't mean it isn't broken.
  157. Where's the father? Answer. (SPOILER) by Rui+del-Negro · · Score: 2

    Let's call the mother's age M and the child's age C (in years).

    We know that:

    M = C + 21

    and

    M + 6 = (C + 6) * 5

    So solving the system we get:

    M + 6 = 5C + 30

    21 + C + 6 = 5C + 30

    C + 27 = 5C + 30

    C - 5C = 30 - 27

    -4C = 3

    C = -3/4

    1/4 of a year is 3 months. 3/4 is 9 months. If the child is -9 months old, that means he or she will be born in 9 months, so has just been conceived.

    The father isn't necessarily on top of the mother (fertilisation can happen up to 2 days after sex), but he's probably still around.

    He may be trying to hold up his pants while running from her father.

    Actually there would be another possible "smart" answer if the mother was a few years younger: the father is probably in jail. :)

    RMN
    ~~~

  158. Coming soon to a /. banner ad near you (n/t) by Anonymous Coward · · Score: 0

    (n/t)

  159. Two Coin Flips answer wrong by Anonymous Coward · · Score: 0

    The answer is not so obvious. Here are the four possible coin flip results (H = heads; T = tails).

    H H
    H T
    T H
    T T

    If one coin came up heads then there is only a 1:3 chance that the other came up heads.

    This is similar to the boy/girl probability question later.

  160. Re:Maybe dumb, maybe not dumb, that's not the poin by HeyLaughingBoy · · Score: 1
    In an interview, you get time to ask maybe a dozen questions of the interviewee.
    Every question counts.
    Well, if every question counts, it's counterproductive to ask dumb questions, isn't it?

    I guess your mileage varies widely from mine, then. My last two interviews (4 years ago and 6 years ago) were very long. The 6 year ago one lasted 3 hours for the first interview and about 1.5 for the second. The interview for my current job 4 years ago lasted all day (8:30 to abt 3pm), but then again, they had flown me in from halfway across the country, so I guess they wanted to get their money's worth :-)

    I think if time is so short that you get "maybe a dozen questions" then you're doing it wrong. This person may be with your firm for years and have a significant impact on the projects he/she works on. The cost of the interview gets lost in the noise when considered against the productivity of a really talented dev or the cost of a really terrible developer. Take your time to get to know him. The good interviews I've had covered the gamut from basic electronics & programming to just "shooting the breeze" over lunch to see how I'd get along with the rest of the team. Trust me, if I felt I was being toyed with, I'd mention it. If no explanation was forthcoming, that's the end of the interview. I don't want to work for a bunch of elitist a'holes. The attitude at all fulltime jobs I've taken (not all the ones interviewed for, mind you) was basically to hire motivated people and let them learn specifics on the job. I like that: it lets me grow professionally, and the companies get new blood with different ideas instead of a bunch of people who just happen to be current with the latest buzzwords.

  161. The Case Study is right by abusimple · · Score: 0

    The Tourist Is Critical

    Consider _Case 3_:

    Three of the monks have red eyes, here's Monk "A"'s thought process:

    I see 2 Red-Eyed Monks, that means they both see:
    1 Red-Eyed Monk (if I have Brown Eyes)
    2 Red-Eyed Monks (if I have Red Eyes)
    Assume I have Brown Eyes:
    Each of the 2 Red-Eyed Monks I see therefore see only 1 Red-Eyed Monk. Now then, each of them must be thinking:
    Either there is 1 Red-Eyed Monk (him)
    Or there are 2 (him and me)
    Assume I have Brown Eyes
    Therefore there is only 1 Red-Eyed Monk (him)
    So HE must be thinking:
    Either there are 0 Red-Eyed Monks
    Or there is 1 Red-Eyed Monk (Me)
    Tourist says there's at least 1
    Therefore, I have red Eyes
    I will kill myself tonight (night 1)
    But, DAMN, he didn't end up killing himself
    Assumption INCORRECT
    I have Red Eyes
    I will kill myself tonight (night 2)
    But, DAMN, he didn't end up killing himself
    Assumption INCORRECT
    I have Red Eyes
    I will kill myself tonight (night 3)

    Monks A,B,C are indistinguishable - they all act exactly in the same way. Therefore A,B,C kill themselves all on the same night.

    Midnight isn't key, you right, but because they always kill themselves in synchronization. Midnight just emphasizes this fact and makes for a better story

  162. From Calvin and Hobbes by Anonymous Coward · · Score: 0

    How many boards would the Mongols hoard if the Mongol hordes got bored?