copy (RedBlackTree)
Copies a tree, copying all its entries.
Arguments
tree0
is the RedBlackTree to copy.
Return values
tree1
is the resulting RedBlackTree.
Complexity
O(size)
Example
Output:
a:
{ key: -25; value: "element"; }
{ key: 0; value: "ZERO"; }
{ key: 19; value: "nineteen"; }
{ key: 32; value: { a: 0; b: 1; }; }
{ key: 34; value: "element"; }
{ key: 35; value: "element"; }
{ key: 3481; value: 135; }
b:
{ key: 0; value: "ZERO"; }
{ key: 34; value: "element"; }
{ key: 35; value: "element"; }