News for hackers. Stuff that matters.
Re:Ask HN: What is the point of algorithm-heavy interviews? by mav3rick on Tuesday November 05, 2019 @07:06AM (#21451611)
No one is asking you to write them yourself. But it is important to know when Quicksort becomes quadratic. Or when separate chaining in a hash table can lead to linear look ups. I find it abhorrent that this thread thinks these things are unimportant. Just use a "Library". How about you know your stuff .
Re:Ask HN: What is the point of algorithm-heavy interviews? by groomed on Tuesday November 05, 2019 @07:23AM (#21451712)
> I find it abhorrent that this thread thinks these things are unimportant. Just use a "Library". How about you know your stuff .

How about the fact that "your stuff" is not algorithm. In 99% "your stuff" is to pick the right library

Re:Ask HN: What is the point of algorithm-heavy interviews? by walterstucco666 on Tuesday November 05, 2019 @08:24AM (#21452112)
That's very different from "algorithm-heavy interview" process.

You could just ask "do you know when quicksort becomes quadratic?"

> Just use a "Library".

Not just a library, a battle tested one.

A bad implementation of quicksort can be much worse than "accidentally quadratic" bad.

a good library could shuffle the array before sorting it and never be quadratic.

Or has hints about quadratic behaviour in the documentation.

A good library could automatically choose the best sort algorithm for the input.

For example Java used quicksort for primitive types and mergesort for arrays of objects.

now it uses trimsort for both.

But the developer just calls `sort` on the collection.

> How about you know your stuff .

I bet you never encountered quadratic quicksort in your life.

   The probability that quicksort will use a quadratic number of compares when sorting a large array on your computer is much less than the probability that your computer will be struck by lightning! 
How about you know your stuff.