News for hackers. Stuff that matters.
Re:Microsoft changed how it interviews software developers by BurningFrog on Sunday December 30, 2018 @02:28PM (#18790842)
I'll be the obligatory ex Googler claiming Google never did ask brainteaser questions, or at least they were long gone by 2006.
Re:Microsoft changed how it interviews software developers by compsciphd on Sunday December 30, 2018 @03:31PM (#18791145)
I was asked to estimate Pi using a unit circle (diameter = 1) inscribed in a unit square (side = 1) around 2012-2013. In a manner that would have a controllable amount of precision.

They wanted monte carlo (more darts, more precision), I went riemann sums (smaller delta x, more precision). It totally through me off my game for the rest of the interview as I was constantly thinking about it.

while not quite a traditional brain teaser, there are a couple of insights one has to get to solve it

1. ratio of circle area to square = pi/4 (but remember, you don't know pi yet, just that it exists, the point is to estimate it)

2. a way to make use of that ratio (i.e. monte carlo, pick a random 2d point (on both x,y from -0.5 to 0.5) if the distance from (0,0) is greater than 1, it is only added to the square, otherwise it gets added to both.

combine the 2 insights and you get pi ~ 4*circle/square

(as mentioned I went with riemann sums, where I calculated the area under the curve of the circle's arc in one quadrant, but same idea you get pi ~ circle_arc_area/.25)

those 2 points aren't quite obvious (I went riemann sums as area questions made me think calculus and went totally down that rabbit hole), and in 30-40 minutes of brainstorming (first 10-15 minute discussion about the person, then actual interview question, then 5+ minutes for any questions you have for the interviewer) can be difficult for many people to get.

The problem can then be, many people can't just stop thinking about a problem they struggled with and will continue to process it (hurting their following interview Qs),

i.e. even if that interviewer thought I did sufficiently, I believe it hurt me on the following Qs as I couldn't just let it go, which in the real world is how I think many people work. If they are struggling with how to solve something, they are dealing with it even when they are supposedly focused on other things (say in meetings, eating lunch....)

Re:Microsoft changed how it interviews software developers by BurningFrog on Sunday December 30, 2018 @04:18PM (#18791386)
Unless you were interviewing for a mathematician position, I agree that's a garbage programming interviewing question. It's focused on your math skills far more than your programming skills.

If it's a "brainteaser" is I guess a matter of definition.

Look, I'm sure people are asked bad questions at all times in all companies, but the policy at Google was clearly to not do that. At least when I was there 2006-2009.

Re:Microsoft changed how it interviews software developers by seanmcdirmid on Sunday December 30, 2018 @03:22PM (#18791106)
Wouldn’t the current niche clever dynamic programming problems google asks you to work out on a whiteboard be classified as brain teasers? Sure, it’s much easier to prep for via the cracking code interview book, but is still not something you would encounter in the wild.
Re:Microsoft changed how it interviews software developers by 13of40 on Sunday December 30, 2018 @02:47PM (#18790942)
Puzzle questions were definitely against company policy and at least ones unrelated to coding were rare by that time at Microsoft, too.