Max returns the Max value of the tree
()
| 121 | |
| 122 | // Max returns the Max value of the tree |
| 123 | func (t *BinarySearch[T]) Max() (T, bool) { |
| 124 | ret := maximum[T](t.Root, t._NIL) |
| 125 | if ret == t._NIL { |
| 126 | var dft T |
| 127 | return dft, false |
| 128 | } |
| 129 | return ret.Key(), true |
| 130 | } |
| 131 | |
| 132 | // Min returns the Min value of the tree |
| 133 | func (t *BinarySearch[T]) Min() (T, bool) { |