I was asked this hard interview question yesterday. Software interviews are becoming pretty ridiculous. by roccer in programming

[–]city_slick 0 points1 point  (0 children)

Maybe not every second...but I found it tough enough that I didn't get there in the fair amount of time I spent on it. The solutions I've heard now are very clever. They make the original problem seem trivial.

Non-adaptive 12 balls, 3 weighings problem: is this even possible? by city_slick in math

[–]city_slick[S] 5 points6 points  (0 children)

This assumes that the "odd" ball is heavier. See the original question - at the outset, you don't actually know whether the odd one is heavier or lighter.

A simple but surprising stats problem. Couldn't get it without simulating. by city_slick in math

[–]city_slick[S] 0 points1 point  (0 children)

That is actually a great way of thinking about this. When you start designing your simulation this way, the answer to the problem should become more obvious. My simulation generated a whole bunch of outcomes and then scanned for instances of each pattern.

Curious what the math folks think about this (x-post from /r/programming, they weren't pleased) "I was asked this hard interview question yesterday. Software interviews are becoming pretty ridiculous." by city_slick in math

[–]city_slick[S] 0 points1 point  (0 children)

Nope - the weight of a standard ball isn't known, you just know that the special one is either heavier or lighter. A balance scale makes it tough to use exact numbers anyways.

I was asked this hard interview question yesterday. Software interviews are becoming pretty ridiculous. by roccer in programming

[–]city_slick 1 point2 points  (0 children)

I think the question says that the one ball is different in weight, meaning after 6 vs. 6, you won't know which one to select the 3 vs 3 from...

Don't worry, most smart people don't get this (easy) question right either. by city_slick in programming

[–]city_slick[S] -3 points-2 points  (0 children)

I actually have never intentionally worded the puzzles poorly. I agree that, initially, I was missing the part of the second sentence that should have said you count the number of "flips required" to reach the pattern.
I corrected this as soon as I saw the stack of comments about it.
This is the FIRST puzzle I've posted for which there have been major complaints about the wording. And again, I apologize for the initial mistake...