Live data from Hacker News

Ask HN: Is asking obscure algorithms any test of programming ability?

news.ycombinator.com

31–40 of 43 posts

Re: Ask HN: Is asking obscure algorithms any test of programming ability?

#31
post #24

A Monotone Priority Queue is neither sufficient nor needed to solve this problem (as it does not give a linear time solution). Instead the proper solution just needs a deque, see http://techieme.in/maximum-element-sliding-window/ . So yes as you can see knowing algorithms is important, as if you don't you will attempt to use an overly complicated data structure to come up with a suboptimal solution.

The solution using double ended queue is often referred to as monotonic queue, because queue content will be monotonic sequence.

The OP referred to a "Monotone Priority Queue" which seems to be something different: https://en.wikipedia.org/wiki/Monotone_priority_queue.

Re: Ask HN: Is asking obscure algorithms any test of programming ability?

#32
post #27

I was recently asked to calculate the fibonacci sequence value in an O(log n) time complexity. I had no clue how to do it and explained that I can solve it in O(N) easily but don't even know how to approach the O(log n) method. I knew there must be some trick using factors but didn't even know how to start the problem. I looked it up later and one of the ways is using matrix multiplication (an implementation I still…

I wonder what the interviewer would have said if you'd written down Binet's formula :)

http://mathworld.wolfram.com/BinetsFibonacciNumberFormula.ht...

Re: Ask HN: Is asking obscure algorithms any test of programming ability?

#33
post #17

Here's what happened to these companies: - They started asking algos and datastructs in the 00s because not too many people had the resources to study it. This served as a proxy for intelligence and was vaguely related as compared to other IQ tests or puzzles - In this decade, more and more CS graduates and bootcampers started studying the same algo and datastruct problems - Unable to reject anyone (because everyone…

I think you've missed an important step in how these systems are used at these companies and how their funnels work. For a comapny like Google, their funnel is so tight by the time a candidate is onsight it's known that they're capable.

Instead, the "nerd show off event" exists for one reason "see how much you want to work at that company". Since the realities of software development means the bulk of the engineers will probably be working on some small part of an unglamourous project, yet the "big 4" still want a monopoly on the best and the brightest, the interview process exists as a very targeted test to find people willing to jump through hoops. At this point the broad strokes of what is required is a solved problem, you just need to spend several weeks/months studying up on errata. The thinking is, any candidate willing to do that will be willing to spend several years working on CRUD interfaces for adsense or refactoring old php.

Re: Ask HN: Is asking obscure algorithms any test of programming ability?

#34
post #17

Here's what happened to these companies: - They started asking algos and datastructs in the 00s because not too many people had the resources to study it. This served as a proxy for intelligence and was vaguely related as compared to other IQ tests or puzzles - In this decade, more and more CS graduates and bootcampers started studying the same algo and datastruct problems - Unable to reject anyone (because everyone…

As someone who is looking to transition from a non-programming field into a paid position, how do I avoid these types of companies? Is there a good indicator of which companies use these types of screenings before applying? Or do I just have to cast a wide net and suffer through these types of interviews?

Re: Ask HN: Is asking obscure algorithms any test of programming ability?

#35
post #17

Here's what happened to these companies: - They started asking algos and datastructs in the 00s because not too many people had the resources to study it. This served as a proxy for intelligence and was vaguely related as compared to other IQ tests or puzzles - In this decade, more and more CS graduates and bootcampers started studying the same algo and datastruct problems - Unable to reject anyone (because everyone…

I think you've missed an important step in how these systems are used at these companies and how their funnels work. For a comapny like Google, their funnel is so tight by the time a candidate is onsight it's known that they're capable. Instead, the "nerd show off event" exists for one reason "see how much you want to work at that company". Since the realities of software development means the bulk of the engineers w…

You are right.

In other words, they want people who'll work for them without complaining. Submissive people. People who won't think out of the box.

Re: Ask HN: Is asking obscure algorithms any test of programming ability?

#36
Algorithms knowledge demonstrates competency in the small, but isn't good for demonstrating skill at programming in the large. The person passing such tests will be effective in developing programs, but not systems, and may not be effective in self-directed design of programs that exist within systems.

But the more obscure stuff doesn't demonstrate much, really, except that they know obscure stuff or are good at researching to find solutions. A more effective question might be: develop or use an algorithm (no constraint on performance like here) to solve problem X. Then follow it up with discussions on how their solution performs and see if it can be improved, and how well they handle being directed to a better--more efficient--solution if they didn't pick an optimal one already.

Of course, even that has problems (with the second part having an implicit bit of "culture fit" to it, and depending on the interviewer being a good critiquer and not merely a nitpicker). And it still only reveals the ability to program-in-the-small. So would only be useful for certain roles, or perhaps more widely for entry level employees.

Re: Ask HN: Is asking obscure algorithms any test of programming ability?

#37
post #17

Here's what happened to these companies: - They started asking algos and datastructs in the 00s because not too many people had the resources to study it. This served as a proxy for intelligence and was vaguely related as compared to other IQ tests or puzzles - In this decade, more and more CS graduates and bootcampers started studying the same algo and datastruct problems - Unable to reject anyone (because everyone…

I think you've missed an important step in how these systems are used at these companies and how their funnels work. For a comapny like Google, their funnel is so tight by the time a candidate is onsight it's known that they're capable. Instead, the "nerd show off event" exists for one reason "see how much you want to work at that company". Since the realities of software development means the bulk of the engineers w…

I think this is right on the money, particularly with respect to Google. They're going to lock you away for X years to work on some internal project that'll probably never see the light of day. I think all of the hullabaloo about company culture "fit" and the awe of working for the Big G factors into that. The work is probably boring and mundane and they hope to further lock you in by making sure that you only subscribe to their ideology. This is all conjecture for now, but I have an internship coming up with one of the Big 4 and while I am genuinely excited/interested to work there I wonder if it'll also confirm my suspicions.

Would you say that Apple or Microsoft are any different?

Re: Ask HN: Is asking obscure algorithms any test of programming ability?

#38
post #35

Earlier quoted context omitted.

I think you've missed an important step in how these systems are used at these companies and how their funnels work. For a comapny like Google, their funnel is so tight by the time a candidate is onsight it's known that they're capable. Instead, the "nerd show off event" exists for one reason "see how much you want to work at that company". Since the realities of software development means the bulk of the engineers w…

You are right. In other words, they want people who'll work for them without complaining. Submissive people. People who won't think out of the box.

That's a scary thought to me. One that's probably correct, but scary, especially at companies who claim to champion "outside the box" thinking. It's almost like a sort of "Do as I say, not as I do."

Re: Ask HN: Is asking obscure algorithms any test of programming ability?

#39
post #35

Earlier quoted context omitted.

You are right. In other words, they want people who'll work for them without complaining. Submissive people. People who won't think out of the box.

That's a scary thought to me. One that's probably correct, but scary, especially at companies who claim to champion "outside the box" thinking. It's almost like a sort of "Do as I say, not as I do."

I think it's just the reality of how software is made. There's room of innovative thinking in small startups, or at the highly technical specialized teams in mega corpX, but at the end of the day the grunt work has to be done by someone and that's going to fall to the line member.

Re: Ask HN: Is asking obscure algorithms any test of programming ability?

#40

No it's stupid. Like asking an iOS engineer a question involving a tree data structure. It is stupid and irrelevant because at the end of the day our job is to build products/features. If you think at a student level you will never learn anything past college. Companies think that by default everyone can write code and build product. So they focus on stupid obscure stuff. I believe it's the opposite. We all went to c…

Will an iOS engineer never consider a binary search tree to store sorted data?
Post reply on HN