正在加载图片...
Heaps Basic Idea Heaps:Height The height of a node o The number of edges on the longest simple downward path from the node to a leaf. The height of a heap The height of its root,(lg n). o A heap of n elements is based on a nearly complete binary tree 16h=3 h=2 14 1oh=1 h=1 8 9 3h=0 h=0 (a) 美 MA Jun (Institute of Computer Software) Problem Solving May7.20205/29. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Heaps Basic Idea Heaps: Height The height of a node The number of edges on the longest simple downward path from the node to a leaf. The height of a heap The height of its root, Θ(lg n). A heap of n elements is based on a nearly complete binary tree h=3 h=2 h=1 h=1 h=0 h=0 MA Jun (Institute of Computer Software) Problem Solving May 7, 2020 5 / 29
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有