Hi guys, I want to ask about heap.size which it means the number of elements that satisfying/following the property of heap(assuming its max heap), lets say I have an array of, then in this case we have a violation of the number 13 which is greater than its parent(12) so we say that the right subtree isn't satisfying the max heap property, as a result the heap.size is just 1 ((because there's just the number 25 which is satisfying that his value greater than its children)) ....I understand that but what about the left tree why we are not including it in the heap.size?! it's already following the property of max heap(16>8,16>14)Code:{25,12,16,13,10,8,14}
thanks!