Converting an essentially complete binary tree to a max heap: example and the C++ code

Published --