Live data from Hacker News

How to solve a hard programming interview question

dailycodingproblem.com

51–60 of 84 posts

Re: How to solve a hard programming interview question

#52
post #38

I tend to find problems like this one, where the brute force solution is straightforward and then you can improve it by using a special data structure, easy. The ones I struggle with are the puzzle-like ones, where solving the problem depends on having some single flash of insight.

Conversely, if you just happen to know the answer because you saw it before, it feels a little bit like cheating. Quite honestly, I wonder how useful those kind of questions are to test someone's capacity to do the job.

Totally useless.

Re: How to solve a hard programming interview question

#53
post #27

With all do respect, I think the author is missing an important point: he is talking about communication, but he seems to be the only one talking... IMHO you should first figure out why it's needed, and optimise for it's use case. F.e. if it's only used once a year and a simple merge+sort takes half an hour, it wouldn't be worth implementing it yourself. IME good (10x?) developers are way more efficient because they…

Good engineering skills and good interviewing skills are not necessarily identical.

Re: How to solve a hard programming interview question

#54
post #38

I tend to find problems like this one, where the brute force solution is straightforward and then you can improve it by using a special data structure, easy. The ones I struggle with are the puzzle-like ones, where solving the problem depends on having some single flash of insight.

Conversely, if you just happen to know the answer because you saw it before, it feels a little bit like cheating. Quite honestly, I wonder how useful those kind of questions are to test someone's capacity to do the job.

Yeah, I do not think they are very useful. I know a lot of people, myself included, who perform worse than their true ability during interviews. It can be an anxiety thing, but also some people just prefer to take their time and deliver solutions in writing vs. work things out in real time on a whiteboard.

I think a good alternative is to give the candidate a nontrivial project that should take around 8 hours, and pay them a day's wage to do it.

Re: How to solve a hard programming interview question

#55
post #45

IMO, the first thing one needs to do in order to be high functioning with challenge is take the mindset that it is ok to underperform in an interview session and not get a particular job. Taking the stress out and focusing on clarity of deep thought helps almost everyone in almost all situations (I hesitate to say everyone since some people do thrive under pressure). It is one thing to read disciplined approaches to…

I find it useful to remind myself that I am interviewing them while they are interviewing me.

Re: How to solve a hard programming interview question

#56
post #45

IMO, the first thing one needs to do in order to be high functioning with challenge is take the mindset that it is ok to underperform in an interview session and not get a particular job. Taking the stress out and focusing on clarity of deep thought helps almost everyone in almost all situations (I hesitate to say everyone since some people do thrive under pressure). It is one thing to read disciplined approaches to…

I've got a phone interview with a well known company soon, and the stress of revising for it is really getting me down.

Re: How to solve a hard programming interview question

#57
post #54

Earlier quoted context omitted.

Conversely, if you just happen to know the answer because you saw it before, it feels a little bit like cheating. Quite honestly, I wonder how useful those kind of questions are to test someone's capacity to do the job.

Yeah, I do not think they are very useful. I know a lot of people, myself included, who perform worse than their true ability during interviews. It can be an anxiety thing, but also some people just prefer to take their time and deliver solutions in writing vs. work things out in real time on a whiteboard. I think a good alternative is to give the candidate a nontrivial project that should take around 8 hours, and pa…

I really like this approach. It’s not like you’re paid a salary to whiteboard pseudo code algorithms, after all.

Re: How to solve a hard programming interview question

#58
post #38

I tend to find problems like this one, where the brute force solution is straightforward and then you can improve it by using a special data structure, easy. The ones I struggle with are the puzzle-like ones, where solving the problem depends on having some single flash of insight.

Conversely, if you just happen to know the answer because you saw it before, it feels a little bit like cheating. Quite honestly, I wonder how useful those kind of questions are to test someone's capacity to do the job.

Didn't Google do a massive study on this and determine these tests weren't effective in determining success on the job?

It was a long article, but I remember they found success was more a function of the proper team more than anything else. You can take the same 20 people, and have them fail miserably or succeed depending on how you divided them up on projects. Sort of an obvious, but not so obvious result.

Re: How to solve a hard programming interview question

#59

> I often find it’s not enough to just be able to solve the question; you really need to vocalize your thought process. I interview candidates regularly, and I can't overstate how important this is. If I ask you a hard interview question, and you sit silently for 10 minutes and then write out a perfect solution on the board without any discussion of how you got there, all I've learned is that you knew the answer. I h…

Ugh, so coming up with a perfect solution to a riddle isn't enough in an interview now apparently. You guys just can't be pleased :)

Perhaps you can simply ask how they arrived to their solution, you owe them at least that. Or be upfront that they should reason aloud.

Re: How to solve a hard programming interview question

#60
post #54

Earlier quoted context omitted.

Conversely, if you just happen to know the answer because you saw it before, it feels a little bit like cheating. Quite honestly, I wonder how useful those kind of questions are to test someone's capacity to do the job.

Yeah, I do not think they are very useful. I know a lot of people, myself included, who perform worse than their true ability during interviews. It can be an anxiety thing, but also some people just prefer to take their time and deliver solutions in writing vs. work things out in real time on a whiteboard. I think a good alternative is to give the candidate a nontrivial project that should take around 8 hours, and pa…

That's better, but probably still not exactly indicative of real-world work... so much of on-the-job work is teamwork. Perhaps you could interview a group of candidates together and as a group assign a project that you know no one person could finish on their own, but would be manageable broken up. The people that form groups and work well together could presumably bubble up.
Post reply on HN