If array A = [1, 2, 3, 4, 5], is it a Max-Heap?
No.
A[1]=1. Children are 2, 3. Both are larger. This is actually a Min-Heap!
Is Heapsort stable?
No.
The structure of the heap does not preserve the order of equal elements during build or extraction.
What is the complexity of finding the k largest numbers in an unsorted array of size n?
O(n log k).
Iterate through n elements. Maintain a Min-Heap of size k. Operations take log k.