Earlier quoted context omitted.
Me: "I'm a software developer, so I would let a material science engineer figure it out." You: "You can't do that... All the material science engineers have drowned." Me: "That's not very realistic..." You: "Thank you for your time. Don't call us, we'll call you."
"Ok the material science engineer gave you the fancy material. It was applied. As you know, nothing is perfect and lasts forever. How do you ensure your building doesn't sink?"
Data structures and algorithms I actually used while working at tech companies
401–410 of 547 posts
Re: Data structures and algorithms I actually used while working at tech companies
#402Earlier quoted context omitted.
My favorite question to ask in software engineering interviews is one that I believe to be un-burnable. > It's 2140 AD, New York is under water up to X feet high. Buildings have been retrofitted with to withstand the water. You are in charge of keeping your building dry. If water gets in and damages the foundation, a few thousand people die or become homeless. > Design a system that ensures that doesn't happen. How c…
Use to build a wall around the city? Have the people who maintained each individual building form a team that can keep an eye on sections in shifts? If we have enough magic material, build a double wall system for breaches? I'm done. Give me my paycheck.
That sounds expensive. Do we need to do that? Does it solve the problem better? Does it maybe create a worse solution? How would you find out?
> Have the people who maintained each individual building form a team that can keep an eye on sections in shifts?
How would you make this less time intensive? Can you use automation?
> If we have enough magic material, build a double wall system for breaches?
Is there a cost-benefit analysis you can run here? How would you find out? Should we keep adding walls ad infinitum or does each additional wall have diminishing returns?
> I'm done.
wrong.
Re: Data structures and algorithms I actually used while working at tech companies
#403Earlier quoted context omitted.
"Ok the material science engineer gave you the fancy material. It was applied. As you know, nothing is perfect and lasts forever. How do you ensure your building doesn't sink?"
I'd let the material science engineer figure that one out too. No way in hell would I risk my ignorance of building maintenance be the cause of thousands of deaths.
Re: Data structures and algorithms I actually used while working at tech companies
#404Earlier quoted context omitted.
IQ is a measure of mental flexibility independent of context. Being able to solve tricky algorithm problems is a measure of mental flexibility in the context of programming. The two are strongly correlated. Of course, the test is confounded by a baseline of programming and CS knowledge.
This is absolutely not true. I have seen amazing scientists and engineers get turned down by FAANG companies because they did not happen to study particular algorithms that were featured in that day's set of questions, and mediocre engineers fly through because they put in more time studying, or perhaps got lucky with the subset of technical questions that were asked.
The "amazing scientist" maybe was not a good culture fit, or, yes, the interview was botched.
Good candidates are so good that they often enough compensate for bad interviews. Sure it means we sometimes don't hire the best, but that's better IME than sometimes hiring a not so good candiate.
Re: Data structures and algorithms I actually used while working at tech companies
#405It's probable that I've done some of the other stuff -- graph traversal comes to mind as feeling like something I've done professionally -- I feel like I've done stuff like that maybe once or twice in ~20 years. While it was useful to have that knowledge, probably, it wasn't even remotely representative of regular work on those jobs.
But that raises another question: is it still worthwhile to test for something you'll use 0.1% of the time on the job? Like, say I didn't know anything about graph traversal, and came across a problem that (even though I didn't know it) was perfectly suited to a solution involving a well-known algorithm. I might search around a bit, but ultimately my solution will probably be pretty non-optimal, might involve brute-forcing, and might be difficult to understand and read since I had no idea what I was doing.
On one hand you could say yes, that's important: even if you will barely use this information, it will be absolutely critical that you have it already and understand it when you do run into a problem that needs it, to the point that we don't want to hire you if you don't have it. On the other hand, you could say that picking it up as you go along is fine, or even writing a bad, brute-forced solution is fine, and the likelihood is that someone else on the team would notice during design or review and suggest the correct approach. You could even say that even if that doesn't happen, a bad implementation of part of your stack isn't even that big a deal; we all write so much technical debt for various reasons, this is just another thing that someone might have to revisit and improve later.
I'm not sure where I fall on this, really.
Re: Data structures and algorithms I actually used while working at tech companies
#406Earlier quoted context omitted.
Yea I interview (and have sat on HC) at Google, and interviewers who ask these types of questions really frustrate me. If your question requires having previously memorized or being able to come up with some tricky algorithm on the fly in 45 minutes and code a solution using it , your question is probably bad. I get why they ask them - they're easy to ask, they're easy to score, and when your question inevitably gets…
My favorite question to ask in software engineering interviews is one that I believe to be un-burnable. > It's 2140 AD, New York is under water up to X feet high. Buildings have been retrofitted with to withstand the water. You are in charge of keeping your building dry. If water gets in and damages the foundation, a few thousand people die or become homeless. > Design a system that ensures that doesn't happen. How c…
Sure, you may say that everyone who does well turns out to be a great engineer. I'm sure Google says the same thing about their algorithm trivia tests. Presumably the goal is to move away from these seemingly arbitrary and irrelevant tests. Just replacing one arbitrary and irrelevant test with another isn't improving the state of things.
Re: Data structures and algorithms I actually used while working at tech companies
#407Early in my career, I interviewed at Google. One of the interviewer asked me to recite the algorithm for constructing a Convex Hull. Since I hadn't done anything related to convex hulls since my algorithms class as a sophomore in college (several years earlier), I couldn't remember all the details. At some point, I said, I know where in CLRS ( https://www.amazon.com/Introduction-Algorithms-3rd-MIT-Press... ) this is.…
Another anecdote of an incompetent interviewer blindly looking for a certain answer: I once had an interview where, for a pretty long question, one trivial step was to check that one set was a subset of another set. Neither set had any special preconditions, just two plain unordered Java HashSets. Not thinking twice about it, I wrote a simple for loop that checked if every element in the smaller set was present in th…
The biggest portion of the in-house interview was some fairly simple algorithm puzzle involving solving some word game given some rules and a list of valid English words. That section of the interview ended with me explaining how hash table lookups are constant time and the interviewer insisting that they are linear time.
To be clear, there was no “gotcha” about collision resolution or anything subtle like that. My claim just came up as an obvious step in my explanation of the running time of my proposed solution and the interviewer jumped on it.
I thought I was quite cordial, but I didn’t back down, and the interviewer seemed quite aggressive. The other interviewer in the room at the time seemed very uncomfortable with the fact that I would question something so basic, but didn’t intervene or express any “opinion” on the “debate.”
I was rejected due to insufficient experience. :)
Re: Data structures and algorithms I actually used while working at tech companies
#408Early in my career, I interviewed at Google. One of the interviewer asked me to recite the algorithm for constructing a Convex Hull. Since I hadn't done anything related to convex hulls since my algorithms class as a sophomore in college (several years earlier), I couldn't remember all the details. At some point, I said, I know where in CLRS ( https://www.amazon.com/Introduction-Algorithms-3rd-MIT-Press... ) this is.…
> I did not get the job at Google. Not to troll, but have you considered that you perhaps were not qualified for the job? There are people that can recite details of convex hull construction algorithms.
Re: Data structures and algorithms I actually used while working at tech companies
#409Earlier quoted context omitted.
It isn't this black and white It can be both From my experience, when you have a big pool of candidates, the ones that pass not necessarily super stars, but they tend to perform at a relative stable level.
No, it is black and white. Just because you have lots of candidates doesn't mean you need to pick sub-par questions. Interview for the skills you actually need. If the person isn't implementing algorithms and data structures from scratch, it's a shit question. Why would you ask questions that don't match the actual work they'll be doing? If they will be doing this work, then obviously it's a fair question. See, black…
> Why would you ask questions that don't match the actual work they'll be doing?
As an interviewer, and likely peer or manager of the potential new hire, I want to understand growth potentials as well, so I want to challenge you during the interview. In my particular situation, there are so many candidates, and so many mediocre ones, we needed to raise the bar, and it served us well.
Re: Data structures and algorithms I actually used while working at tech companies
#410Earlier quoted context omitted.
Algorithms and Data Structures don't measure either of those things. General IQ is not measured by very specific technical problems. Nor is learning something specific an indication of "grit". It's a proxy for interviewers to jerk their ego.
Answering data structure/algorithm questions is absolutely meant as a measure of grit. It takes perhaps hundreds of hours of leetcode grinding to be able to quickly answer any problem which might come up in an interview. The point is to find out how committed applicants are.