If I am doing an interview question which at some point requires me to sort something like an array, is HeapSort generally the best option? Normally, I see merge or quick sort being the standard with a space complexity of O(n) or O(logn), however, heap sort has a space complexity of O(1). Why is merge and quicksort the norm, or am I just ignorant?
Of course in the real world there are lots of things to consider, I'm just talking in terms of interview questions where I want the best space and time complexity.