Condense and extend std.Treap's traversal functionalities. (#20002)

The core functionalities are now in two general functions
`extremeInSubtreeOnDirection()` and `nextOnDirection()` so all the other
traversing functions (`getMin()`, `getMax()`, and `InorderIterator`) are
all just trivial calls to these core functions.

The added two functions `Node.next()` and `Node.prev()` are also just
trivial calls to these.

* std.Treap traversal direction: use u1 instead of usize.

* Treap: fix getMin() and getMax(), and add tests for them.
4a77c7f258Cheng Sheng committed on 7/29/2024, 2:47:55 AM· committed by GitHubparentd1d9529
2 files changedLine totals unavailable