Originally Posted by
laserlight
That does not describe a complete binary tree.
That incompletely describes a max heap. I was hoping that you would list in detail both the properties of a min (or max) heap, and then in your next answer explain which one you were talking about and why.
I asked "what is this property that you refer to?", not what are you confused about.
I think you expressed this really poorly in posts #1 and #4. Instead of talking about "the leafs of binary complete tree is always satisfying the property of min/max heap" or even that "its trivial thats the leafs are satisfying minmum heap property", you should have asked: "why does a complete binary tree in which the root is a leaf trivially satisfy the other property of a min (or max) heap, i.e., that the value of each node is no greater than (or no less than) the values of its children"?
Actually, the more common way of expressing that min heap property is to say "the value of each node is no greater than (or equivalently, less than or equal to) the values of its children". So, if there are no children, then this is vacuously true, i.e., it is an example of how all the members of an empty set satisfy any property that can be ascribed to them: if there are no children, then it is vacuously true that the value of each node is greater than the values of its children.
This means that a complete binary tree in which the root is a leaf is a min heap, it is also a max heap, it is also a binary search tree, and it is a balanced binary tree. Hence, whichever one we chose it to be depends on whichever one suits our purposes.