Successor returns the Successor of the node of Key if there is no successor, return default value of type T and false otherwise return the Key of successor and true
(key T)
| 164 | // if there is no successor, return default value of type T and false |
| 165 | // otherwise return the Key of successor and true |
| 166 | func (t *RB[T]) Successor(key T) (T, bool) { |
| 167 | node, ok := searchTreeHelper[T](t.Root, t._NIL, key) |
| 168 | if !ok { |
| 169 | var dft T |
| 170 | return dft, ok |
| 171 | } |
| 172 | return successorHelper[T](node, t._NIL) |
| 173 | } |
| 174 | |
| 175 | func (t *RB[T]) pushHelper(x *RBNode[T], key T) { |
| 176 | y := t._NIL |
nothing calls this directly
no outgoing calls
no test coverage detected