The most bizarre technical interview I went on
medium.com
medium.com
Do FB engineering types really think that anyone -- save for mutants like von Neumann and Ramanujan -- is genuinely able to solve problems like these from scratch, having never seen them before, in such ridiculously short time frames? Being as typically they were kicking around as open problems (either in the literature or folklore) for years and years before the optimal solutions were found?
Or that such "tests" are a measure for anything besides rote memorization skills -- and the willingness to suck it up, and cram it out, week after week, specifically for otherwise pointless regurgitation sessions like these?
Really now -- do they?
So it's more like a "clubhouse handshake" than anything else, IMO.
This being said, "use a table" seems a pretty obvious thing.
You may argue that undergraduate computer science is not relevant to a software engineering job, and you might be right, but it's a relatively level playing field. What would you recommend instead? Ask a candidate something more job-specific, to build something you are currently working on, that tests for familiarity with the specific domain and toolset you happen to be using?
It selects for people who learned how to do dynamic programming. Great technique, but I'd say that the vast majority of programming at Facebook, Google, or Microsoft doesn't involve writing dynamic programming algorithms (or really any algorithms) from scratch.
What I want to see in a candidate is their ability to reason in areas that it's reasonable to expect them to be able to extrapolate. If somebody doesn't know dynamic programming, they can still be a great programmer, but they're going to flop this problem. Dynamic programming is nonobvious.
That said, anybody applying for these kinds of jobs should research the kinds of questions asked and I think DP is so commonly asked about that knowing when to apply it is a practical way to be prepared.
If I wanted to give applicants a hard time, I'd give them a few hints about genetic recombination and then expect them to derive the Holliday Junction. After all, every undergrad biologist learns about it and it's "obvious" if you know how DNA base pairing works, but I guarantee that almost nobody who didn't study biology would infer its existence as a solution to the recombination problem.
Other places follow the same practice because they hold these market leading companies up on a pedestal, which is tantamount to argument by appeal to authority.
But, but, but all the top companies do this and they're successful!!! Yeah, well they're successful despite stupid practices like this, not because of them. Their business models are so resilient that they can tolerate a whole shitload of failures in other aspects or dimensions and still come out on top.
2. I'm nearly 100% certain they couldn't derive, in real-time and in-scope of the interview, the solution to a PhD thesis problem they had never heard of before, nor previously been given the answer to simply to recall it later.
3. I'm nearly 100% sure that if they can do #2, then they should be interviewing for #1 someplace else, not trying to become employee # X-thousandth-and-one in a mature enterprise, or that they'd never be asked these questions to begin with because they'd be interviewing for a job that was directly related to and based on their own pre-existing published academic works.
I'll start to believe that these companies are pioneering best-practices around hiring when their frontline recruiters are psychiatrists and psychologists who specialize in proficiency assessment and personality profiling.
The people that are hurting themselves are companies applying these methods to small applicant pools.
You might want to re-examine this assumption more critically. With a high enough false negative rate, you end up burning out your candidate pool (and severely deterring those who "failed" from every applying again).
Google themselves discovered this a few years ago when they did a fundamental re-evaluation of their hiring process -- having come to the conclusion that their previous filtering methods were woefully ineffective at predicting actual on-job performance. And specifically went back to their databases to try to re-recruit many of the people who had been "flushed" by the earlier incarnations of their filtering process.
So if you're asked that question in an interview, it's only checking if you've heard the answer. Because you almost certainly aren't going to come up with it on the spot.
That said, if you want to work at goog/fb/amazon/et al, you have to study, and that's a common dp problem. Put in your 100 hours of studying and you'll do fine. And before you grump at me, that's not an endorsement of this (I think it's quite silly), but we all know the deal. So stop whining and study before your interview, or don't bother interviewing with the well known list of companies that love algorithm bingo.
Facebook is looking for (Devs Who Can Implement CS Algorithms) ∩ (Devs who can game the system)
The second criteria is arguably more important when working for FB, than the first.
The tortoise and hare algorithm is so simple that it was never published as a novel result, it was never an "open question". It was just something people figured out when it came up.
https://en.wikipedia.org/wiki/Cycle_detection#Tortoise_and_h...
It's sick how broken tech interviewing is.
So I switched screens and googled it. Same for the docs for a few libraries that made things work (like the python csv module).
I not only got an offer, but I was told right up front "your google fu is strong."
I'd almost want to be looking for someone who does research on these problems. Reinventing the wheel is the classic engineering mistake.
They're essentially essay questions- come up with reasonable-enoguh assumptions and get on with business.
We don't do a -ton- of stuff like that, but I've found that if you can't estimate with any rationale, you're probably just not very good at whatever domain you're asked to deal with.
For example, 'what sort of architecture are we going to use to make this system', 'how many simultaneous users are we expecting', 'how many requests per second can we handle given this hardware', 'how much memory do we really need- if we quadrupled it, what would that get us', etc.
Also- if a person locks up when they're thrown "How would you move mt fuji", there are going to be a lot questions that I'd be concerned about getting answers out of you for...
For a Sr or higher person, I'd hope to get some reasonable answers.
Am I off?
In addition- do you feel it's reasonable for a "Sr or higher" candidate to lock up (ie- stammer, not be able to come to any sensible conclusion)if one was to be asked a question where they have to use the same tools to answer those questions above when asked a question not in their domain- for example, 'how many pianos tuners are likely to be in this area'?
I'm not arguing in favor of non-domain experience questions like mt fuji or piano tuners- but I can't see hiring a Sr who can't tell give me some Fermi question approximations about how many servers we need.
Maybe I don't know what a Sr is supposed to be capable of doing?
I'm 100% sure that the people who came up with these solutions in the first place didn't take only 20 minutes.
It's also stupid that you can't look up the answer. In the real world I'd rather have an employee who can use google then one that takes 30 hours to find a solution to something complicated.
It would seem so. That, and a willingness to say and do whatever it takes to sit with the "big boys."
I'm not interested in showing solutions for other people problems, I'm interested in finding solutions to problems I need to solve. Problems that might have never been solved before.
I want to think outside of the box and work on providing real world solutions, writing as clean code as I can, and being able to work with others through many revisions of our projects.
I don't want to work some place where I am meant to parrot back information I found from somewhere else.
That's what the page he linked says about this problem. Solution he linked doesn't cover case with negative numbers and is at best pseudo-polynomial.
Or is the whole post just satiric bit about the state of recruitment?
It confirmed my suspicions of ego is why these questions are asked so often.