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.
I’d expect someone to know heaps the same way I’d expect them to know about hashmaps or quicksort.
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.
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.
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?
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.
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.