News for hackers. Stuff that matters.
Re:C++ Programming Questions to Ask on Interview (2017) by ajross on Friday October 19, 2018 @12:53AM (#18254317)
> I'd expect any CS grad past an sophomore undergraduate level to understand exactly what a max heap is

Never once heard the term, and I've written several heap-based priority queues over the course of more than two decades of professional work.

So... yeah, I'm too dumb for that filter I guess.

Re:C++ Programming Questions to Ask on Interview (2017) by banachtarski on Friday October 19, 2018 @12:59AM (#18254339)
Surely you've heard the distinction between the max-heap and a min-heap before...

And honestly, I'm sure if you asked what it was in an interview, you would get a straight answer and not be dinged for it. I would filter based on your saltiness level though.

Re:C++ Programming Questions to Ask on Interview (2017) by dev_dull on Friday October 19, 2018 @01:22AM (#18254396)
Sounds like their would be mutual filtering.
Re:C++ Programming Questions to Ask on Interview (2017) by gcb0 on Friday October 19, 2018 @03:02AM (#18254697)
sounds like all those people are filtering for is who went to the same university, at around the same time as they did.
Re:C++ Programming Questions to Ask on Interview (2017) by stochastic_monk on Friday October 19, 2018 @08:49AM (#18256323)
I don’t think so. Heaps are a bread-and-butter data structure typically covered in an undergraduate Data Structures course and then used in an undergraduate introductory Algorithms course.

I’d expect someone to know heaps the same way I’d expect them to know about hashmaps or quicksort.

Re:C++ Programming Questions to Ask on Interview (2017) by ajross on Friday October 19, 2018 @11:17AM (#18257267)
But as mentioned multiple times, I do know heaps. I've written heaps that were deployed in production software even. Yet given a question that asks without context "Write a max heap" I'd be lost. That's not a term I know.

Conflation of terminology (about which heaps are already a terribly confusing example) with expertise is kinda the essence of why this kind of list is garbage.

And in any case, I retreat the broader point that has nothing to do with my personal vocabulary: the question wasn't even asking about how heaps work! It just wanted to know you could write a class declaration with the API.

Re:C++ Programming Questions to Ask on Interview (2017) by stochastic_monk on Friday October 19, 2018 @02:33PM (#18258881)
I agree that the list isn’t good. I would only expect someone to know that it permits constant time access to a maximum or minimum element, and that it has a tree structure. Actually writing an implementation I would not.

A class declaration with an API (and no implementation) would be rather simple: insert, top, remove, and a constructor.

I will say that I typically hear “heap” and whether it’s max or min is largely implicit in the task, so perhaps the comparator qualification is unneeded.

Re:C++ Programming Questions to Ask on Interview (2017) by jdlyga on Friday October 19, 2018 @10:54AM (#18257104)
True, but so many excellent programmers, people with 10 years of experience, typically don't remember all the details of classes they took a decade ago. I remember heaps, but I'd have to look up the details since it's not something I work with everyday. Once you're deep into your career, it's much more about practical real world style programming.
Re:C++ Programming Questions to Ask on Interview (2017) by justin66 on Friday October 19, 2018 @11:24AM (#18257335)
> I've written several heap-based priority queues over the course of more than two decades of professional work

Out of curiosity, what terminology would you use to distinguish between a heap that offers up the lowest value first and one that offers the highest value first?

Re:C++ Programming Questions to Ask on Interview (2017) by ajross on Friday October 19, 2018 @12:36PM (#18257900)
Why would one even need such a term? The difference is the direction of the pointy end in the comparison operator...
Re:C++ Programming Questions to Ask on Interview (2017) by justin66 on Friday October 19, 2018 @01:07PM (#18258162)
> Why would one even need such a term?

Like any word, it's shorthand for a longer set of words.

> The difference is the direction of the pointy end in the comparison operator...

That's not descriptive of what the thing is, that's descriptive of how one part of it will be implemented.

I get that you don't think it is important, but I am surprised that you are acting defensive about the fact that it's a term practitioners ordinarily use. It's the first thing someone who looks up a binary heap is likely to see in Wikipedia, captioning the top two illustrations in that article. It's not just Stanford-cult algorithmic knowledge.

Re:C++ Programming Questions to Ask on Interview (2017) by jdlyga on Friday October 19, 2018 @10:49AM (#18257075)
Totally agree. You learn so much theory in computer science courses, but that is less important during practical career work. It's much more about learning codebases, libraries, and good debugging skills.