News for hackers. Stuff that matters.
Re:Ask HN: Can engineers from Google or Facebook solve white... by kjeetgill on Tuesday August 14, 2018 @11:06AM (#17758587)
The question I recently got that I found annoying was this: Given input (4, 2, 3, -1, 5) and output (-30, -60, -40, 120, -24) what's the function between them?

I don't actually mind doing whiteboard interviews even on minimal prep. I've gotten a few of the "flagship" company offers and failed a few. I think part of it is internalising that nothing is going to guarantee you anything. You can always hit a question you bomb on and have an interviewer that will move on or bury you for it.

Phone screens are 2-4 questions and on-sites can add another 6-10. A 5% bomb rate for an on-site question will put you into the 60-70% pass rate.

I'm confident that if I do all the interviews I'll land atleast one offer but if you're putting all your eggs in one basket you're going to have a rough go of it.

Re:Ask HN: Can engineers from Google or Facebook solve white... by franzwong on Tuesday August 14, 2018 @11:36AM (#17758875)
I also got annoyed with "closest pair of points" problem [1]. It needs some geometry observations to prove how time complexity can be achieved. I was just thinking "Are they testing me geometry?"

I don't know how questions are created and filtered for interviews.

[1] https://en.wikipedia.org/wiki/Closest_pair_of_points_problem

Re:Ask HN: Can engineers from Google or Facebook solve white... by kjeetgill on Tuesday August 14, 2018 @12:50PM (#17759553)
I agree I think it's not a great problem but it's worth knowing: some problems we're designed to have an obvious answer and allow the proctor to guide you to the ideal one.

This has the nice property of acting like a fizzbuzz and a sample of how do I work on hard problems stage. The first part is pretty pass fail the second is observational. This unfortunately requires a better thoughtful proctor which isn't always the case.

If I had a candidate that couldn't do the (n^2)/2 solution that's pretty bad. It's nested fors, man. Bang out in like 10 lines.

Still though, I agree, not great.

Re:Ask HN: Can engineers from Google or Facebook solve white... by newusertoday on Tuesday August 14, 2018 @11:33AM (#17758846)
what is the answer y = -120/x ?
Re:Ask HN: Can engineers from Google or Facebook solve white... by kjeetgill on Tuesday August 14, 2018 @01:00PM (#17759653)
(I hope I didn't mess up the original numbers).

The output for an index i was the product of the full input sequence excluding the element at i in the input.

The followup question was how do you do it in linear time.

Re:Ask HN: Can engineers from Google or Facebook solve white... by awareBrah on Tuesday August 14, 2018 @12:59PM (#17759644)
product of all elements except self. usually a follow up to this question is to dissalow the divide operator
Re:Ask HN: Can engineers from Google or Facebook solve white... by kjeetgill on Tuesday August 14, 2018 @01:02PM (#17759668)
Yep, so I take it you've seen it. Did you feel it was a good/fair question? I thought the follow-up was but the original a little arbitrary.
Re:Ask HN: Can engineers from Google or Facebook solve white... by awareBrah on Tuesday August 14, 2018 @01:09PM (#17759753)
i dont like the way it was phrased. its better in the original format of just, given a list of ints, return a list where each elem is product of all except that elem.

I cant really judge, I would be hapy to have received this on an interview cause I've seen a variation of the problem on leetcode.

I just went through the interview loops at several FANGS, firs time doing this and got several offers, including G. I used to be super scared of even applying for fear of rejection because I thought I wasn't smart enough. I am self taught with lib arts degree from an average school, low gpa.

but I actually enjoyed learning these problems and figuring out solutions, and as time went on it got easier and easier. I enjoyed the interview process and had a good experience everywhere except FB.

my suggestion to those who are striving for FANG is just to keep practicing the questions and try to have fun with it, and go into the interviews with a positive, collaborative attitude.

Re:Ask HN: Can engineers from Google or Facebook solve white... by jfasi on Tuesday August 14, 2018 @11:12AM (#17758638)
> A 5% bomb rate for an on-site question will put you into the 60-70% pass rate.

I'm not sure I follow the math here, can you expand a little?

Re:Ask HN: Can engineers from Google or Facebook solve white... by kjeetgill on Tuesday August 14, 2018 @11:26AM (#17758772)
I just punched .95^10 (.59) and .95^6 (.73) into Google. I mean they're made up numbers, the point I was trying to get at was that you can do fairly well on these things but you just need to fail one question to fail in total.

But if you do even two interviews your chance at getting one offer jumps to 1-.4^2 thru 1-.3^2 (84-91%).

(Am I out of practice? Did I do that wrong?) -- I tapped out painful on my phone.

Re:Ask HN: Can engineers from Google or Facebook solve white... by jfasi on Tuesday August 14, 2018 @11:38AM (#17758886)
I suppose the math checks out, but I disagree with the model: the whole point of doing multiple interviews is to get a variety of opinions based on the knowledge that bombing an interview just happens. You're assuming that bombing one disqualifies you, but that's not true.
Re:Ask HN: Can engineers from Google or Facebook solve white... by kjeetgill on Tuesday August 14, 2018 @12:41PM (#17759450)
Yea, sure? I sorta agree and disagree but it's a little beside the point.

My point was addressing the frustration with whiteboard interviews. It sucks to feel qualified and still get rejected. That doesn't necessarily mean they all way outclass you (they might!). If you treat interviewing like applying to colleges (3 or 4 big schools, a few backups) you're going to be a lot less burned by the system.

Sure, hate the system. But we've covered blaming the interviews. But that's not helping anyone right now.

As to the model, in my experience if you do sufficiently poorly on one and leave any doubt on another no one interview will save you. Sure you could add in the probability of failing two vs one. But that's numerically the same as just making that .95 a .9. It's a made up number, so what. The conclusion is kinda the same: doing pretty well can still lead to a failure for any given job, but you can still do pretty well in your job hunt.