Live data from Hacker News

Top algorithms in interview questions

geeksforgeeks.org

21–30 of 70 posts

Re: Top algorithms in interview questions

#21
post #16

What a typical, uninspired, and pretentious list. I've recently started to opt out of interviewing people because I'm often teamed with someone that will Google one of these, think they're some sort of genius, and proceed to make some poor twenty-year-old feel like a doofus for not knowing the algorithm for a convex hull. Speaking of which -- seriously? The only time I even had to LOOK at that algorithm was when I re…

For my part, I think the top few items on each group make for perfectly valid interview questions, but as we descend each list I agree with you more and more.

Things like DFS, BFS, linked list insertion, binary search, et. al. should be barely more than typing for a good experienced developer. They consist of basic skills, only slightly above fizzbuzz level. Implementing "Heap Sort" OTOH just tests whether you've recently reviewed the Heap Sort algorithm, which seems completely irrelevant to me.

Re: Top algorithms in interview questions

#22
Nobody needs to be able to code these in an interview. Ever. For certain domains you should be aware of them and be able to look up decent implementations. But to think that level of knowledge is important in an interview is bogus. I could just as easily ask similar questions and weed out most CS grads that get into Google or Facebook with these:

Please implement a first order low pass IIR filter. Tell me how the butterfly pattern in an FFT gets your from N^2 to N*logN. Oh, and implement an FFT. Write a basic PID controller implementation. Tell me how you'd handle a Field Oriented Control system that needs to run in voltage limit most of the time - what stability issues may occur? Write a fixed-point implementation of the sin(x) function. Implement a 2-pole 2-zero transfer function. For bonus points do it in fixed point without rollover or saturation problems. Assuming you have a matrix library available, give me the boilerplate code for a Kalman Filter. What kind of ODE solver should you use for long term stability when simulating planetary systems?

These are similar difficulty questions from a different domain, but many of them are likely to be used far more often in that domain than any of the interview questions in TFA are likely to be used in their domain.

The goal of an interview is to ascertain weather the candidate is capable of doing stuff and learning stuff, and if that's likely to carry over into the stuff you need done. It's not to see weather they can produce an answer to some specific problem on the spot. How you do that I'm not telling - it's hard enough without helping you find the people I need ;-)

Re: Top algorithms in interview questions

#23
Isn't the idea of preparing for software development interviews ridiculous?Instead of improving my algorithms skills to become a better developer I find myself memorizing a ton of problems just so I can answer similar ones during interviews. It feels like I'm preparing for the SATs again.

Re: Top algorithms in interview questions

#24
In my opinion, it's a settled question now. If you are looking for a job, you better cram these lists or you are dead meat. The screening tests and the interviews basically boil down to these set of questions for most of the companies.

Re: Top algorithms in interview questions

#25
post #16

What a typical, uninspired, and pretentious list. I've recently started to opt out of interviewing people because I'm often teamed with someone that will Google one of these, think they're some sort of genius, and proceed to make some poor twenty-year-old feel like a doofus for not knowing the algorithm for a convex hull. Speaking of which -- seriously? The only time I even had to LOOK at that algorithm was when I re…

maybe they want to skew their workforce to select for youngsters - recent grads would be best at these sort of things, cause as you say no-one writes these things in real life and if you do, you reach for the books. Glad those days are behind me, but it is a shame that this nonsense passes for interviewing.

I'm not sure if that is intentional or not, but these type of algorithms certainly favor someone who recently learned about them but hasn't had the experience to forget them. Because they are already incorporated into every framework that would use them, they are more "code trivia" for someone 10 years out of school.

Re: Top algorithms in interview questions

#26
This site is EXTREMELY popular in India, and used a lot by students AND interviewers (I know many who simply ask questions from the front page of G4G on a given day). It's the inverted tree equivalent in India.

I'm someone who was actually interviewed by GeeksForGeeks because a junior from college connected them to me (They do interviews with people who have gotten placed in * dream * companies... not my terminology).

In the interview, which was done over email, I actually mentioned that resources like G4G are bad resources for studying because they over-simplify algorithms and reduce them to silly proportions, and also encourage rote learning. To my surprise, they directly published the same ON THEIR SITE. Speaks volumes of their editorial team (?). This article too has little basis in reality, but more of one guy's list.

I strongly suggest you use much better resources for learning algortihms, rather than this site, which is (by and large) the W3Schools of algorithms/data structures.

Re: Top algorithms in interview questions

#27

Would a better way to interview be questions like: 1) I have an array of 1000 integers, which of these would be the best way to sort them a) quicksort b) bubblesort... 2) what sort of structure would you use to store a list of numbers and strings 1) dictionary/hash 2) two arrays ... and so on. These would give you the certainty that they know which is which, you could ask give reasons to see if they mention O() and s…

I second that. It's good to know what tools to use and why, but not necessary to know how to make the tools.

Re: Top algorithms in interview questions

#28
JFC, that's such bullshit. You want the mundane? Go for it. You actually want someone who can take a bunch of real operational data and solve the problem when the Person With The Money says, "We need to know what is actually happening with ____. And we've promised it in two days. You're it."

Who gives a flying fuck about writing the best sorting algorithm? "sort" works just fine, unless you're Google and microseconds matter. And then, you're really at the edge of R&D. You need to be able to manipulate data with aplomb. You need to be able to write an algorithm that works, and then refine it to make it go a hundred (or more) times faster once you understand why it is so slow.

Re: Top algorithms in interview questions

#29
It's a pretty pointless thing to ask something like solution for linked list and etc. Either you know it, or not, and if not, coming up with solution that took others many years to come up with is like asking to invent something on the spot - i.e. it's practically impossible. So it's a ridiculous kind of question and doesn't show anything useful about the candidate.

Re: Top algorithms in interview questions

#30

JFC, that's such bullshit. You want the mundane? Go for it. You actually want someone who can take a bunch of real operational data and solve the problem when the Person With The Money says, "We need to know what is actually happening with ____. And we've promised it in two days. You're it." Who gives a flying fuck about writing the best sorting algorithm? "sort" works just fine, unless you're Google and microseconds…

I'm not a Googler, but I imagine memory usage would be a more meaningful constraint than speed per se on the mega-sorts they are doing. Completely speculative, but in service of a point valid even if the statement isn't: in those rare circumstances, the needs of the company are going to bizarre _anyway_. If you don't know what demands you'll face in the future, there's limited value in learning ahead of your needs.
Post reply on HN