News for hackers. Stuff that matters.
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.

There are no comments on this comment yet.