I am writing a function to determine whether a given binary tree is a max heap. If the binary tree had only one node (the root), would it be considered a valid max heap?
To be considered a valid max-heap, a binary tree must satisfy two properties:
A tree with a single node satisfies both properties, so it is a valid max-heap.