public class RedBlackBST<Key extends Comparable<Key>,Value> extends Object
| Constructor and Description |
|---|
RedBlackBST() |
| Modifier and Type | Method and Description |
|---|---|
Key |
ceiling(Key key) |
boolean |
contains(Key key) |
void |
delete(Key key) |
void |
deleteMax() |
void |
deleteMin()
Red-black deletion
|
Key |
floor(Key key) |
Value |
get(Key key)
Standard BST search
|
int |
height()
Utility functions
|
boolean |
isEmpty() |
Iterable<Key> |
keys()
Range count and range search.
|
Iterable<Key> |
keys(Key lo,
Key hi) |
static void |
main(String[] args)
Test client
|
Key |
max() |
Key |
min()
Ordered symbol table methods.
|
void |
put(Key key,
Value val)
Red-black insertion
|
int |
rank(Key key) |
Key |
select(int k) |
int |
size()
Size methods
|
int |
size(Key lo,
Key hi) |
public int size()
public boolean isEmpty()
public boolean contains(Key key)
public void deleteMin()
public void deleteMax()
public void delete(Key key)
public int height()
public Key min()
public Key max()
public Key select(int k)
public int rank(Key key)
public static void main(String[] args)
Copyright © 2014. All Rights Reserved.