最大堆和二进制树 [英] max heap and binary tree

查看:214
本文介绍了最大堆和二进制树的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的数据结构书中的一个例子,而且这个练习写的是这不是一个最大堆,但是它不会说你的理由,请帮助我,为什么它不是最大堆谢谢。 / p>

this is an example in my data structure book and for this exercise was written that this is not a max heap,but it doesn't say its reason would you please help me that why it is not a max heap thanks.

       35
      /  \
     /    \
    27    28
   / \    / \
  /   \  /   \
 14   16 20   19


推荐答案

这是一个堆树,但这本书写错了。不要按照这本书。

This is a heap tree, but this book is written wrong. Do not follow this book.

这篇关于最大堆和二进制树的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆