At school we are currently learning sorting algorithms in Java and I got for my homework the Heap Sort. I did my reading, I tried to find out as much as I could, but it seems I just can't grasp the concept.
I'm not asking you to write me a Java program, if you could just explain to me as simply as you can how the Heap Sort works.
Heap sort include simplest logic with time complexity O(nlogn) and space complexity O(1)