Live data from Hacker News

An Algorithm for Passing Programming Interviews (2020)

malisper.me

261–270 of 352 posts

Re: An Algorithm for Passing Programming Interviews (2020)

#261

The anagram solution leaves the actual hard part unfinished^. Also, to solve in O(n) you need a bit array (or a database like Postgres that can do an XAND on a string). > Sort the characters of the words alphabetically. Since anagrams are all made up of the same letters. This will give us the same string for any pair of words that are anagrams of each. Correct. > Produce a dictionary of the number of times each lette…

What is XAND?

exclusive and? Just guessing, I use some of these chips in my synthesizer

Re: An Algorithm for Passing Programming Interviews (2020)

#262

Earlier quoted context omitted.

Google translate is sufficient. They’ll do it pretty carefully, complete with “pretend you get stuck at this specific point and if you get asked why to use a hashmap, act baffled for a moment, and then say X”

It’s ridiculously obvious when people have seen the question before. The way we do it is like this: we have like 3 or 4 different small variations on each question. Such that the solution is measurably different, in quite telling ways, but that the given problem looks almost identical. In one specific case the given is identical, but there are 3 variations to the question based on how the candidate asks questions abo…

I don't get it.

Your candidates show that after learning how to solve a problem, they can demonstrate they're able to solve it.

Have you considered just hiring candidates and then training them, or expect them to learn approaches that are new to them?

Right now, you're pretending that your company needs random puzzles solved, and they're pretending that they're able to solve random puzzles without looking them up in an algorithms book.

What's the point of this whole theatre?

I get that your ego is enjoying that, but is that providing your company really any value?

Re: An Algorithm for Passing Programming Interviews (2020)

#263

Earlier quoted context omitted.

Google translate is sufficient. They’ll do it pretty carefully, complete with “pretend you get stuck at this specific point and if you get asked why to use a hashmap, act baffled for a moment, and then say X”

As someone who has studied and passed before in this manner, and is now an interviewer, I have a simple solution that other companies should follow: for at least one round of interviewing, let me (the interviewer) use my own custom question, where the goal is not so much to solve it but rather to reason outloud collaboratively about many different aspects of the question. I like to use 3d graphics as a domain that ca…

I don't understand how a point is a collection of vertices. Are you talking about X, Y, and Z coordinates?

This is a good example of how ambiguity kills an interview and reduces it to quickly figuring out what the interviewer is talking about so I might have a decent chance of solving the problem with the time remaining.

My experience with interviewing at Google, Facebook, and Amazon can be reduced to "What the hell are you talking about?"

Re: An Algorithm for Passing Programming Interviews (2020)

#264

Earlier quoted context omitted.

There's a certain irony to exploiting an ethically questionable method to obtain a job and, once you've obtained that position, using your authority as a gatekeeper to attempt to prevent others from entering the same way.

Hey I have some suggestions to how you can improve this process that, having passed through it myself, obviously has some inefficiencies! -hmm, well that wouldn't be very ethical would it. Guess we'll just have to leave things not working very well.

I can't speak for them, but I would assume that jsiaajdsdaa still considered themselves qualified for their positions - even if they employed ethically questionable methods for passing the interviews. In the end isn't that all that matters given that's what these interviews are supposedly trying to measure?

What part of jsiaajdsdaa's process do you think is more efficient? To me it sounds less objective ("the goal is not so much to solve it") which seems like it would make the process less efficient when assessing candidates.

Re: An Algorithm for Passing Programming Interviews (2020)

#265

Earlier quoted context omitted.

Google translate is sufficient. They’ll do it pretty carefully, complete with “pretend you get stuck at this specific point and if you get asked why to use a hashmap, act baffled for a moment, and then say X”

It’s ridiculously obvious when people have seen the question before. The way we do it is like this: we have like 3 or 4 different small variations on each question. Such that the solution is measurably different, in quite telling ways, but that the given problem looks almost identical. In one specific case the given is identical, but there are 3 variations to the question based on how the candidate asks questions abo…

Why do you call it cheating? Did the candidate actively copy a solution by deception or were they just very well prepared - to the point that they quickly recognised and solved the problem which they had seen before?

Perhaps I should throw out my CLRS and Skiena and invent everything in those books from scratch?

It's an Arms race because people like you have turned it into one. You're not solving Nobel prize winning problems, so stop expecting people to magically invent on the spot novel algorithms for things they've never seen before.

Some people are good at it and some are not.

Re: An Algorithm for Passing Programming Interviews (2020)

#266
post #242

Earlier quoted context omitted.

This is exactly the type of question that is the worst for interviews. It's a completely uncalibrated, completely subjective, esoteric type of question where you can't say exactly why you liked a candidate or why you didn't like her. There's no data underneath it except for "I liked how the conversation went." It completely gives an advantage to candidates who know 3D and completely gives a disadvantage to candidates…

Life's not fair, but I would also tend to discriminate against a candidate that doesn't "get" 3D graphics. Is there any programmer that started coding in his teenage years that didn't at some point try to do 2D drawing in code?

Yeah, I would say a much bigger issue than algorithm questions in interviews are interviewers who assume all programmers follow a particular path (usually the one they followed) and discriminate against those-that-did-not-follow-particular-path.

Computer science is a massive field that people enter through many different and unique ways. If you're trying to gatekeep and force everyone to enter through the same gate that you entered, you should not be an interviewer.

Re: An Algorithm for Passing Programming Interviews (2020)

#267

Earlier quoted context omitted.

Software engineers that QQ about how unfair algorithm interviews are are clearly out of touch with how difficult and truly unfair interviews are for other high paying industries like law or medicine (in the US) where getting interviews is based on pedigree and getting one or two rejections can permanently deny you from top firms/positions. There are always things that can be improved about interview processes, but ma…

I don’t think anybody is complaining about the initial barrier to entry. These interviews would be more like asking a surgeon who’s worked for 10 years in one hospital to pass an anatomy multiple choice quiz when transferring to another hospital

While it's true that asking an experienced surgeon basics of anatomy is worthless, please take into account that all surgeons at least operate on humans. If you take 10 random developers, chances are most of them worked on completely different levels and domains throughout their careers (e.g. embedded dev, backend, frontend, devops will have vastly different skills).

Re: An Algorithm for Passing Programming Interviews (2020)

#268

Earlier quoted context omitted.

> If you've seen the question/answer before just say so! I will totally appreciate the honesty and it goes a long way. Why? You're testing their ability to produce the right answer to a given problem - not their problem solving ability. To that end it shouldn't matter if they've seen the problem or not. I always find it hilarious when recruiters say that "getting the optimal solution isn't everything." I've failed nu…

> Why? You're testing their ability to produce the right answer to a given problem - not their problem solving ability. To that end it shouldn't matter if they've seen the problem or not. Pretty sure most people want to test problem solving ability, and hopefully your problem solving ability solves the problem correctly. If you method to solve the problem is to find the answer online and repeat it... that may not be…

Really? In my position as a senior member on my team, one of the biggest mentoring costs is just teaching junior members how to search and find answers for themselves.

Yes, day to day I'm not copy and pasting huge blocks of code from Stack Overflow, but when I need an answer and I don't immediately know it my first move is always to search internally or externally for others who may have already shared it.

Why is being able to effectively search for for answers not considered good problem solving?

Re: An Algorithm for Passing Programming Interviews (2020)

#269

Almost all advice online about interviewing is written from the point of view of the candidate. Sometimes this is good advice, but sometimes it devolves into some kind of astrology, where candidate are just guessing how things work. I've done +300 interviews at FAANG so I can share bit of advice from the interviewer's side. The caveat is that this is based on how I conduct interviews, so YMMV with other people. * Alw…

[deleted]

Re: An Algorithm for Passing Programming Interviews (2020)

#270

Earlier quoted context omitted.

Point coordinates, not the point itself.

A vertex is a point. So a point being a collection of vertices doesn’t make sense. A point in the sense you mean is a collection of real numbers equal to the number of dimensions of the space it’s in.

> A point in the sense you mean is a collection of real numbers equal to the number of dimensions of the space it’s in.

Not necessarily. In 3D graphics, it is common to represent points with homogeneous coordinates, where points in N-dimensional space are represented by N+1 real numbers. Using 4x4 matrices [0] to describe affine transformations of 3D points is very convenient.

(Agreed with your overall point though. Just goes to show how different some fundamental perceptions/definitions can be.)

[0]: https://en.wikipedia.org/wiki/Affine_transformation

Post reply on HN