Is it correct to call something with no elements a binary heap? I think it is correct, for one element too, but I'm not sure. It seems to satisfy the definition (from Wikipedia):Shape property: a binary heap is a complete binary tree; that is, all levels of the tree, except possibly the last one (deepest) are fully filled, and, if the last level of the tree is not complete, the nodes of that level are filled from left to right.Heap property: the key stored in each node is either greater than or equal to or less than or equal to the keys in the node's children, according to some total order.
Can a heap have no elements?
data structures;heaps