Live data from Hacker News

Ask HN: Can engineers from Google or Facebook solve whiteboard questions easily?

news.ycombinator.com

151–160 of 206 posts

Re: Ask HN: Can engineers from Google or Facebook solve whiteboard questions easily?

#151

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…

what is the answer y = -120/x ?

(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 whiteboard questions easily?

#152

Earlier quoted context omitted.

what is the answer y = -120/x ?

product of all elements except self. usually a follow up to this question is to dissalow the divide operator

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 whiteboard questions easily?

#153
post #101

Earlier quoted context omitted.

I also work at Google and what mystifies me when I do interviews is just how consistently people manage to screw up even the medium difficulty questions. I used to love asking this question until it was banned: https://programmingpraxis.com/2012/01/20/knights-on-a-keypad... This is a great question because it has several levels of solutions: 1. A recursive solution that iterates over all sequences, exponential time a…

I was asked this question at a company (unicorn, but lower bar than Google, got the offer) and I only described #1. Thanks for calling me stupid though!

That wasn’t my intention, and I updated my comment to clarify. Did your interviewer offer suggestions or just sit there?

Re: Ask HN: Can engineers from Google or Facebook solve whiteboard questions easily?

#154
post #105
post #31

Earlier quoted context omitted.

>>If you disregard existing knowledge, you are likely to spend a lot of time cooking up something complex and half-assed that creates an unnecessary maintenance load. Unless you are stuck on an Island coding during a vacation, not one person on earth faces this kind of a situation. Almost anybody doing anything apart from basic beginner level coding work knows to look up to a solution on the internet if a solution is…

"Almost anybody doing anything apart from basic beginner level coding work knows to look up to a solution on the internet if a solution is not scaling already" This applies to some practical areas, but some are murky and need more than agile google-fu to waid through of an algorithmic jungle to a solution that provides added value to end user. There is a discipline and domain dependent threshold where the internet su…

In your area of work, the domain is computational geometry, so asking questions there is perfectly fine.

In fact that is exactly I was trying to imply. Questions need to be about the area of your work, rather than testing candidates on proxy subject totally irrelevant to their jobs.

Re: Ask HN: Can engineers from Google or Facebook solve whiteboard questions easily?

#155

Earlier quoted context omitted.

product of all elements except self. usually a follow up to this question is to dissalow the divide operator

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.

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 whiteboard questions easily?

#156
post #153

Earlier quoted context omitted.

I was asked this question at a company (unicorn, but lower bar than Google, got the offer) and I only described #1. Thanks for calling me stupid though!

That wasn’t my intention, and I updated my comment to clarify. Did your interviewer offer suggestions or just sit there?

It may not have been the intention but I'm honestly aghast at the utter elitism coming out of Google and Facebook. I get that you are "superior humans" that are plucked from top institutions making 25% more than me at Amazon, but you don't have to keep emphasizing it.

My interviewer offered suggestions. Finally I described memoizing it (can be done with 2 lines in Python with a dictionary) though he was more interested in how to do it without extra space by utilizing a BFS that uses the input list as a queue. Then he ran off for another meeting.

Re: Ask HN: Can engineers from Google or Facebook solve whiteboard questions easily?

#157

Earlier quoted context omitted.

> I've heard many of my coworkers joke that if they went through the interview process again they'd probably fail. I’ve heard this joke at a lot of tech companies. Also, “the hardest thing I’ve ever done at my job was pass the interview.” Just shows how divorced from day-to-day work skills interviewing has become. I think most tech companies severely overestimate the cost of false positives, particularly in the USA w…

Tech interviews, coming from someone transitioning into the field, are blowing me away. One national retailer I spoke to does two phone screens, then an onsite round with nine coworkers. I've never seen anything like this in my previous field (mechanical engineering).

Its quite common in the tech area. Some teams in FANG companies(and wannabe FANG companies) are known to reject a candidate even if a single interviewer gives a bad feedback. Like say they did 9 rounds of interviews, and then they do a bar raiser round. They still reject you even if one single interviewer gave a bad feedback.

There is also a concept of 'machine coding round' in a few companies here in Bangalore. Where you are given like an hour to implement sort of like fairly medium application.

You could write a perfectly working application, but if the evaluator thinks its not simple or complicated for their taste, its still a straight reject.

Its almost like they want cookie cut candidates who practiced interviewing day in and out for years.

The real practical world experience is largely considered useless.

Re: Ask HN: Can engineers from Google or Facebook solve whiteboard questions easily?

#158
post #32

Earlier quoted context omitted.

Do you have a cite/example of a lecturer doing that on an exam? Are there any examples where that has been successful? I had never heard of that happening! It would be extremely cool if it ever worked.

A teacher of mine, who studied maths at Oxford, was given a problem sheet on his first day and was told to finish by the time of his first tutorial. He made no progress and was reduced to tears as he thought he was incapable at Oxford. Turns out, he was given a set of unsolved problems on purpose :)

this was known as nerd hazing in my grad school.

Re: Ask HN: Can engineers from Google or Facebook solve whiteboard questions easily?

#159
post #131

Earlier quoted context omitted.

What memorized algorithm does this test for? As far as I know there is no algorithm to do this, and this interview tests for algorithm design rather than memorization.

You said above that you have set LNH for a T3 writing out the obvious solution to your question. The problem is that optimizing that solution comes one of two ways: 1. having seen the specific class of problem before and knowing, as you're writing that solution, to stop and switch to the class of solution you've seen before that would solve the problem more efficiently, or 2. finishing the obvious, poorly performing…

This is a fair point, even tough it doesn’t answer my question. When I interview I split up the coding and the algorithms assessments: if someone quickly and correctly implements the naive solution, I consider myself justified in grading them as solid in coding and moving on and having an algorithmic design discussion for the rest of the interview so I can speak more to their algorithms abilities.

If someone fails to design anything more sophisticated than number 1 despite my guidance, or takes an unreasonable amount of time to implement it, that’s a signal.

Also, let’s keep in mind a hiring recommendation isn’t a judgment of a person’a abilities as an engineer, it’s a judgement of how badly we should be trying to hire them relative to other candidates. My LNH is a statement that the candidate is solid but not stellar enough to extend an offer to. If our hiring pool were restricted or we needed to hire more people my assessment would be accordingly softened.

Re: Ask HN: Can engineers from Google or Facebook solve whiteboard questions easily?

#160
post #101

Earlier quoted context omitted.

I also work at Google and what mystifies me when I do interviews is just how consistently people manage to screw up even the medium difficulty questions. I used to love asking this question until it was banned: https://programmingpraxis.com/2012/01/20/knights-on-a-keypad... This is a great question because it has several levels of solutions: 1. A recursive solution that iterates over all sequences, exponential time a…

I mean I'm surprised you don't see why this question is plain stupid. I've had to deal with an algorithm problem of this difficulty once in my entire work life and I was given a week time to go figure out the best way to go about this. Your problem creates an unrealistic standard of a software developer. You don't get to see something like their coding quality which is a lot more important in a candidate than their a…

>>I mean I'm surprised you don't see why this question is plain stupid.

Its more psychological than technical.

Once a person knows how to do a thing, they start to think any one who doesn't, is stupid.

Their intelligence becomes the baseline to measure others intelligence.

Post reply on HN