makeRedBlackTree (RedBlackTree)
makeRedBlackTree ( range -- tree )
Creates a tree from a range of pairs (key value), all entries will be aliased.
makeRedBlackTree ( builtinList -- tree )
Creates a tree from a builtin-list of pairs (key value), all entries will be aliased.
Arguments
makeRedBlackTree ( range -- tree )
range
of (key value) pairs (see Range).
makeRedBlackTree ( builtinList -- tree )
list
is a builtin-list (key value) pairs.
Return values
tree
is the resulting RedBlackTree.
Complexity
O(size*log(size))
Example
Output:
{ key: 1; value: "ONE"; },{ key: 2; value: "TWO"; },{ key: 3; value: "THREE"; },
( 1 "ONE" ),( 3 "THREE" ),( 2 "TWO" ),
{ key: 1; value: "ONE"; },{ key: 2; value: "TWO"; },{ key: 3; value: "THREE"; },