A New Algorithm of Calculating Enumeration Number of Any Min-heap and Max-heap

Wei Li · Computer Knowledge and Technology · 2011

According to the definition of the min-heap and max-heap.this paper presents a new enumeration counting formula of the min-heap and max-heap while generating the n-tipples permutation representing a n-node min-heap and max-heap.And the special condition when the min-heap and max-heap is a full binary tree is discussed.At last,an O(n) time algorithm of actuating the enumeration number of any min-heap and max-heap is given.

Read the paper · More papers on PaperTik