Live data from Hacker News

Ask HN: How to not fail on coding interview questions?

news.ycombinator.com

91–100 of 129 posts

Re: Ask HN: How to not fail on coding interview questions?

#91
post #78
post #76

BALL-PITS and CLOWN NOSES I worked with a guy, Bob, in our college computer room. Bob had returned to get his BS after many years in industry. He had great stories. He also had great advice. He taught me that you can learn a lot about how a company will treat their employees by paying attention to the way they treat you during the interview. He suggested several sign that indicated it was best to just "walk away". If…

> The big scam is "We hire the best and the brightest". And adding noise to the hiring process increases the effect of "we are the best". If you flipped a coin, it would be more honest and less expensive than putting people through a "difficult" whiteboard test. But you wouldn't get the "we only hire geniuses" effect. As these "difficult" tests are usually based on a corner of the CS field that the interviewer enjoys…

Spot on.

Re: Ask HN: How to not fail on coding interview questions?

#92
post #21

Earlier quoted context omitted.

+1 for practice. Gone are the days when you could go into a tech interview and count on your skills and smarts carrying you to the finish line. They’re just too high pressure and picky nowadays, and you’re competing with too many good candidates. You need rote practice: mock interviews with good mock interviewers, and book study. I’d shoot for at least 10:1 prep:interview ratio, so for a 4 hour interview, prep at lea…

They’re just too high pressure and picky nowadays, and you’re competing with too many good candidates Indeed. Many people (including myself) find it hard to reconcile our lived experiences with the hysterical claims in the press about a desperate skills shortage. To the OP: if it helps, understand that these kinds of interviews and how you do on them are in no way reflective of your skills as an engineer or your wort…

The shortage is a myth and corporate propaganda.

They have collectively adopted a strategy of constant moaning because they always want more and better candidates for lower prices.

Re: Ask HN: How to not fail on coding interview questions?

#93
post #76

BALL-PITS and CLOWN NOSES I worked with a guy, Bob, in our college computer room. Bob had returned to get his BS after many years in industry. He had great stories. He also had great advice. He taught me that you can learn a lot about how a company will treat their employees by paying attention to the way they treat you during the interview. He suggested several sign that indicated it was best to just "walk away". If…

> It is my opinion (based on experience) that companies that insist on a whiteboard test, despite years of programming on your resume and open source code, are either Ball-Pit companies (who don't know what it means to be a professional) or Clown-Nose companies (who know what it means to be a professional but still treat you like a commodity). Just walk away. This is the typical HN vs the world attitude. "Boycott the…

Anger? I am not, nor did I intend to come across as, angry. I'm just passing along interview advice.

As for the myth of "world class salaries" I know, for example, that my nephew who works at one of the Top 5 companies, has a salary that is higher than I ever made. But he also lives near the company and has to share the rent with 4 other "world class salary" colleagues because he can't afford an apartment. I used to work in NYC with a "world class salary". One place I looked at to rent was $2000/month... which was a couch in the living room behind a japanese screen and kitchen privileges. Salary is relative (as in, it helps to have a relative with a basement apartment).

I've been to Google. What I saw was a large area of desks with no partitions, a literal sea of "the best and brightest". A historically accurate counterpart might be https://bakethiscake.files.wordpress.com/2012/07/sewing-room...

However, the coffee is fresh and free. The sleeping pods are available. Laundry and haircuts can be had onsite. The food is first class and available for breakfast, lunch, and dinner. There is, in fact, no valid reason to leave the building. It's almost like working from home.

If you're fresh out of college and just passed your data structures final you probably can quote the order of an algorithm off the top of your head. If you hate your current job enough to put up with anything, sure do the whiteboarding. I certainly have done it. I'm not above it for some jobs. If you don't mind travelling to a location and talking to people who have no idea what you might do, why you're there, or who you might report to, then go for it. If you're being laid off and need a new job in a hurry, go for it. If you're not confident in your abilities as a professional, go for it.

But if you're job shopping and looking for a company that respects you as a professional, give some thought to the interview process. That process is dictated by management so it is a direct representation of how management views you. If you are considering a job change and looking at other companies, look carefully at what is being presented.

I've had bad interviews that were directly with the hiring managers. But at least I was pretty sure that I was turned down because they didn't need or didn't want what I could do for them. And I didn't have to remember that Coopersmith-Winograd is O(n^2.375477).

Re: Ask HN: How to not fail on coding interview questions?

#94
post #65

Earlier quoted context omitted.

And yet, the bulk of phd students don't reverse binary trees.

The binary tree is one of the core data structures used in search. To apply at google and not be able to perform the basic search algorithms on that data structure is a huge red flag. Binary tree is to search what an array is to the programming language, would you hire a programmer that could not use array indexes?

As if everyone employed at google is a core search engineer. Moreover, if you take your average programmer and let him/her implement an array at a low level, you’ll get either a mess or nothing, since the complexity of using arrays and btrees has nothing to do with the complexity of implementing these. And the complexity not in theory knowledge, but in an implementation itself. One basically cannot write, test and prove it in short term (see e.g. “Implementation Issues” on wp).

Re: Ask HN: How to not fail on coding interview questions?

#95
post #89
post #9

I really enjoyed practicing on Pramp [1]. I ran through their whole batch of problems (roughly 40) so I can't schedule more interviews, but it helped me a lot to work on the soft skills required for FAMG type interviews. Unfortunately I still didn't pass the Google interview (had on-sites in Zurich) even though I was very well prepared. I also maintain (sort of lol) a list of interview preparation resources [2], alth…

At least 2 downvotes on this comment. I'm done with this site.

Hey I appreciated your comment, have an upvote.

Try not to take things personally, it could have just been a bot. https://news.ycombinator.com/item?id=17334552

Re: Ask HN: How to not fail on coding interview questions?

#96
post #84

Several people have mentioned practicing on LeetCode problems. I've been doing LeetCode problems recently as exercises to refresh skills in languages I use infrequently but don't want to forget too much of. Here's a tip that they either don't tell you, or that I managed to overlook. You are allowed to mutate inputs. I had assumed that inputs were read-only, and spent about three months trying to solve "Given an array…

> Can you still solve it in O(N) time and O(1) space if when your code returns the answer the input must be unchanged?

I don't think that is possible in general. In some cases, such as your "small integers only" case, the program can get extra working memory by essentially compressing the input, doing some work in the freed-up memory, and uncompressing; but if the input memory is already used optimally, there should proveably be no way to store the input plus additional data in those bits.

(Obviously, you can e.g. store one bit of the input in the program counter by splitting the entire program on an initial "if (first_bit) ..."; but that's just moving information around without gaining additional storage.)

FWIW, mutating the input array is a neat trick, but I wouldn't be inclined to accept such a solution, either.

Re: Ask HN: How to not fail on coding interview questions?

#97
post #76

BALL-PITS and CLOWN NOSES I worked with a guy, Bob, in our college computer room. Bob had returned to get his BS after many years in industry. He had great stories. He also had great advice. He taught me that you can learn a lot about how a company will treat their employees by paying attention to the way they treat you during the interview. He suggested several sign that indicated it was best to just "walk away". If…

"We, as professionals, should consider whiteboarding as an insult.

Just walk away."

Absolutely disagree.

There are tons of developers who have many years under their belt and have glaring holes in their skillsets, or have a complete skillset mismatch, or who are simply not very bright.

Conversely, there are some people who are absolutely brilliant, or deeply knowledgable in some areas, and this is one way to possibly determine this.

Though a whiteboard discussion is not always going to be entirely efficient, and can be used to test all the wrong things - it is an opportunity to talk with someone directly about the kinds of problems they will solve.

Any developer that won't do whiteboard work is displaying 'negative signals' and you should not hire them.

Of course, asking potential hires ridiculously difficult or specific questions which essentially tests their ability to memorize CS algorithms is futile as well ... but whiteboard chats are generally positive and it's why all the best companies use them.

Re: Ask HN: How to not fail on coding interview questions?

#98
post #76

BALL-PITS and CLOWN NOSES I worked with a guy, Bob, in our college computer room. Bob had returned to get his BS after many years in industry. He had great stories. He also had great advice. He taught me that you can learn a lot about how a company will treat their employees by paying attention to the way they treat you during the interview. He suggested several sign that indicated it was best to just "walk away". If…

"which they never read, at least nobody did at my interviews"

At small companies, the people that interview you are likely to participate in the hiring decision, so it stands to reason that they would read your CV. At companies like Google, interviewers are tasked with providing data that's not on your CV. Your CV would definitely be read by several people before an offer is extended.

"real professional interview involves a discussion about what the company does, what it current problems are (aka why are they hiring)"

For a company as large as Google, there is probably no one who could tell you what all the current problems are. Or even what all the open software engineering roles are about. And there's a lot of information on the web about Google, what they've done, what they're doing and trying to do.

(If I were being considered at a role at a small company, of course I'd expect the type of discussion you envisage, early on in the process. But at Google etc. I'd expect for those issues to be discussed with the recruiter (early in the process) and then with specific hiring managers (when they're ready to make an offer, but need to match you with a team)).

Re: Ask HN: How to not fail on coding interview questions?

#99
post #84

Several people have mentioned practicing on LeetCode problems. I've been doing LeetCode problems recently as exercises to refresh skills in languages I use infrequently but don't want to forget too much of. Here's a tip that they either don't tell you, or that I managed to overlook. You are allowed to mutate inputs. I had assumed that inputs were read-only, and spent about three months trying to solve "Given an array…

What's the point of the test if you can chose the input? E.g. for a sorting algorithm, you could input an already sorted list then?

Re: Ask HN: How to not fail on coding interview questions?

#100

>there's also extreme examples like the inventor of homebrew that got rejected by google because he couldn't reverse a binary tree. HN has rehashed this debate plenty, but I don't think you should necessarily see this as an example of a dramatic failure of the Google SWE interview process. Homebrew became a success due to great vision and execution, not because it solved a challenging technical problem. Howell seems…

I agree with your point, but to add an additional public example: the creator of GWAN was also rejected by the process http://www.gwan.com/blog/20160405.html
Post reply on HN