RedBlackTree.last

Returns the last entry of the tree.

Arguments

None

Return values

{ key: Key; value: Value; }
structure is the last entry. It will be an entry with the biggest key because a tree is always sorted.

Complexity

Constant

Example

"sl/redBlackTree" useFile a: RedBlackTree; 35 "element" a.insert 0 "ZERO" a.insert 34 "element" a.insert -25 "element" a.insert 19 "nineteen" a.insert 3481 135 a.insert 32 { a:0; b:1; } a.insert a.last print
Output:
{ key: 3481; value: 135; }