Max returns the Max value of the tree
()
| 130 | |
| 131 | // Max returns the Max value of the tree |
| 132 | func (t *RB[T]) Max() (T, bool) { |
| 133 | ret := maximum[T](t.Root, t._NIL) |
| 134 | if ret == t._NIL { |
| 135 | var dft T |
| 136 | return dft, false |
| 137 | } |
| 138 | return ret.Key(), true |
| 139 | } |
| 140 | |
| 141 | // Min returns the Min value of the tree |
| 142 | func (t *RB[T]) Min() (T, bool) { |