|
|
|
|
|
TreapIn computer science, a treap is a binary search tree that orders the nodes by adding a random number priority attribute to a node, as well as a key. The nodes are ordered so that the keys form a binary search tree and the priorities obey the min heap order property. - If v is a left child of u, then keyv < keyu;
- If v is a right child of u, then keyv > keyu;
- If v is a child of u, then priorityv > priorityu;
- (priorityv > priorityu means u was inserted before v)
Treaps exhibit the properties of both binary search trees and heaps. External links
|
 |
|
| Copyright 2005-2009 OnPedia.com. All Rights Reserved |
|
|