If I have a binary max-heap (a nearly complete binary tree with the max-heap property), then will the median always be a leaf node? I've found some examples where this is the case, but haven't found a counter example -- though this isn't enough for me to formally prove it so far.
i.e. for the set of values {1,2,3,4,5} where the median is [3], the tree would be:
5
/ \
4 [3]
/ \
2 1
So in this case, the median is a leaf node.