10. 二叉堆(Binary Heap) 二叉堆是完全二叉树(或者近似完全二叉树);其满足堆的特性:父节点的值>=(<=)任何一个子节点的键值,并且每个左子树或者右子树都是一个二叉堆(最小堆或者最大堆);一般使用数组构建二叉堆,对于array[i]而言,其左子节点为array[2*i],其右子节点为array[2*i+1];二叉堆支持插...
Binary heap vs binary search tree# While a binary heap is a binary tree, it is not necessarily abinary search tree. A binary heap cares about both children being greater than the node, whereas in a binary search tree, the left child is smaller than the node and the right child is larg...
Implementation of Elementary Algorithms (infix-prefix-postfix-evaluation-to-longest-common-increasing-sub-sequence-activity-selection-balance-kd-binary-heap-binomial-tree-breath-depth-first-search-max-flow-shortest-path-topological-sort-calculus-derivati