Description Usage Arguments Details Examples
Creates a new, empty, binary search tree. A bst
stores keys and
values. You can insert new key-value pairs in, and you can
retrieve values out by providing a key.
1 | bst(keys = NULL, values = NULL, compare = compare_default)
|
keys |
(optional) keys to initially insert into the tree |
values |
(optional) values should be the same length as |
compare |
The comparator that the tree should use for ordering |
The default comparator will use <
, so is defined for
any types with which you can use <
.
Note that there is no checking for consistency of keys.
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.