Live data from Hacker News

An Algorithm for Passing Programming Interviews (2020)

malisper.me

341–350 of 352 posts

Re: An Algorithm for Passing Programming Interviews (2020)

#341

Earlier quoted context omitted.

What niche do you work in, if you don't mind my asking?

I don’t have a niche. I’m full stack. I do everything related to web apps and been at six companies doing that all in different fields. (Seed startups to large public companies) Maybe if I was in computer vision then I’d use some of these algos more often. But those usually require a special masters or PhD to get an interview anyway. So, not really applicable to the overall industry tbh.

Thanks! For what it's worth, I'd say that full stack work is a specific niche in the field. It's a much different area of concern than the things I work on day to day.

Re: An Algorithm for Passing Programming Interviews (2020)

#342

Earlier quoted context omitted.

I don’t have a niche. I’m full stack. I do everything related to web apps and been at six companies doing that all in different fields. (Seed startups to large public companies) Maybe if I was in computer vision then I’d use some of these algos more often. But those usually require a special masters or PhD to get an interview anyway. So, not really applicable to the overall industry tbh.

Thanks! For what it's worth, I'd say that full stack work is a specific niche in the field. It's a much different area of concern than the things I work on day to day.

It's hella common for SV though. The overwhelming majority of jobs here and startups are based around it. So, unless you're doing something close to hardware - you're likely working on a web app.

This doesn't mean you're just making pretty widgets for a browser.

Re: An Algorithm for Passing Programming Interviews (2020)

#343

Interviews are really a dumb game these days so if you want to really game it you can go with a statistical approach: * Practice questions by company on LeetCode, sort by frequency of last 6 months and work down the list, do maybe 75-100, the list updates once a week * Search for the company on the LeetCode forums and sort by most recent. If a question is not on LC yet it will likely get posted there, so you can get…

No, if you really want to game it you sign up for membership on Chinese forums where people post the questions word for word minutes after completing the interview. That or work exclusively with private recruiters that tell you the questions verbatim because they have a vested interest in you passing. Interview questions don't rotate that frequently, especially for smaller companies or more specialized roles, and a $…

Please suggest some Chinese forums: I’m not sure how to google for them…

Re: An Algorithm for Passing Programming Interviews (2020)

#344

Earlier quoted context omitted.

As an interviewer, this is so incredibly frustrating - we don't change our questions often and because of that the questions and answers are all over these forums. With that said, it is incredibly easy to spot someone cheating - they often write the most perfect optimal solution from start to finish, helper functions first, often with the same function names as the forums themselves. The trick I've learned is to ask…

> 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…

> the one thing I appreciated about FB/Meta's recruiters is that they were always honest about the process and what was expected - 2-3 Leetcode mediums/hards in 45 minutes and they only care about optimal solutions

A counter data point: I recently passed Google's interview a few months ago. In one round, I was asked to solve a certain kind of bipartite graph matching problem; not being a fresh new grad with ACM medals, I obviously couldn't solve it in polynomial time and just implemented a brute-force solution in the end. In another round, I came up with a solution the interviewer said they've never seen before, although it could be slightly slower than the "optimal" solution he had in mind depending on the input size.

As an interviewer in my last company, I always made sure the solutions were well motivated, and have rejected candidates who could write down the perfect solution but couldn't explain why. If I were to be asked by the candidate for the specific runtime I was looking for, I would probably just reply with "don't worry about it, just try your best" or "let's focus on correctness first and worry about efficiency and other trade-offs later".

Testing for problem solving ability is hard, but that's still one of the key signals we wish to extract whenever possible.

Re: An Algorithm for Passing Programming Interviews (2020)

#345
post #242

Earlier quoted context omitted.

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 t…

3D graphics is not a good moat, I agree. There are much better moats -- such as recursion, there's no way I'd let someone in my team if the don't get recursion, even though we almost never use it :)

Re: An Algorithm for Passing Programming Interviews (2020)

#346
post #99

Or don't agree to interviews that include algo challenges, leetcode/hackerrank nonsense, array shuffling shenanigans. Choose companies that put thought into their evaluations.

Just my $0.02: I'd much rather spend a few weeks refreshing basic data structures and algorithms than doing the "non-algo" challenges I've gotten because they feel way less objective than getting questions where there's a correct answer. Most of the time the alternative to non-algorithm questions is some form of take home assignment that's usually multiple hours long and that you get no feedback on or chance to corre…

The interview is about interpersonal skills as well, even in the case of "technical" tests. I've given specially crafted answers based on what I could tell about the interviewer and what he wanted to hear. Your solution might have looked simplistic/smug and that's why they rejected you.

Was that a good reverse filter for you? For me it wouldn't have been, and I'd have given then the sensible solution in the scope of the interview.

Re: An Algorithm for Passing Programming Interviews (2020)

#348

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…

> and even while you code As an interviewer I explicitly ask candidates NOT to do this (or only doing it if they want). For some reason there is this expectation in coding interviews. I challenge anyone that pushes their interviewees to do this, to sit down during one of their own coding sessions and vocalize the stuff they are coding while doing it. In my opinion it is stupid, and unnecessary. When my interviewees s…

Luckily my problem-solving thought process is already like conversation so just saying out loud what I'm thinking is just vocalizing what's already going through my head.

The more I read HN comments the more I realize that not everyone reasons through problems "verbally" (even if it's silent or internal) and uses some other thought process. To me, coding has always been like speaking a very specific and pedantic language.

I would find it interesting if other people were able to share their own mental models for coding, if that's even possible.

Re: An Algorithm for Passing Programming Interviews (2020)

#349
post #67

Earlier quoted context omitted.

>It's a full-fledged examination that expects you to excel while being constantly watched and judged. and interrupted, frequently, because that's also perfectly normal. It's comical how this industry now thinks these arcane and often quite difficult DS&A interview question processes are reasonable and how it's been so normalized people just study this for weeks before applying to a new position, sacrificing evenings…

Made an edit to my post: One last thing to throw in, its pretty clear that theres a correlation between the top software companies and how hard their leetcode interviews are. You can claim all you want it doesnt work, but facebook and google have very hard leetcode interviews and are known for the best software

Google and Facebook are known for the best software? They are known for "some" exceptional software; but most of Google stack is crap. Facebook we can hardly know but they rely heavily on buying startups.

Re: An Algorithm for Passing Programming Interviews (2020)

#350

Earlier quoted context omitted.

It's a great way for second-raters to grind their stats instead of actually building something.

>second-raters to grind their stats so sayeth the people on the outside of companies building the most complex software in the world.

That wasn't really a dig, but I should have said jr. devs instead of second-raters.
Post reply on HN