Next:
Data Structures
Up:
CSE 2320: Algorithms and
Previous:
1. Modifying Operations
2. Queries
Examples
?
Search(S,k)
= returns a pointer x to an object in S such that key(x) = k, or NIL if no such object exists.
?
Min(S)
= returns object in S having the lowest key according to the total ordering
?
Max(S)
= returns object in S having the highest key according to the total ordering
?
Successor(S,x)
= returns the object in S whose key is the next larger to key(x) according to the total ordering, or NIL if x is maximum.
?
Predecessor(S,x)
= returns the object in S whose key is the next smaller to key(x) according to the total ordering, or NIL if x is minimum.
Copyright © 1998 The University of Texas at Arlington