Title:
BinarySearchHeapConstruction Download
- Category:
- CSharp
- Tags:
-
[C/C++]
[源码]
- File Size:
- 1kb
- Update:
- 2015-12-07
- Downloads:
- 0 Times
- Uploaded by:
- 刘辉
Description: Read the statement of problem G for the definitions concerning trees. In the following we define the basic terminology of heaps. A heap is a tree whose internal nodes have each assigned a priority (a number) such that the priority of each internal node is less than the priority of its parent. As a consequence, the root has the greatest priority in the tree, which is one of the reasons why heaps can be used for the implementation of priority queues and for sorting.
A binary tree in which each internal node has both a label and a priority, and which is both a binary search tree with respect to the labels and a heap with respect to the priorities, is called a treap. Your task is, given a set of label-priority-pairs, with unique labels and unique priorities, to construct a treap containing this data.
To Search:
File list (Check if you may need any files):
BinarySearchHeapConstruction.cpp