diff options
| author | Cheng Sheng <jeru.sheng@gmail.com> | 2024-07-29 04:47:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-28 19:47:55 -0700 |
| commit | 4a77c7f2588ce42c10df53fc1242f684ff506720 (patch) | |
| tree | f2f4e9cca8b4ac34939a2490c17029a9db4800d7 /lib/std/BitStack.zig | |
| parent | d1d95294fd657f771657ea671a6984b860347fb0 (diff) | |
| download | zig-4a77c7f2588ce42c10df53fc1242f684ff506720.tar.gz zig-4a77c7f2588ce42c10df53fc1242f684ff506720.zip | |
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.
Diffstat (limited to 'lib/std/BitStack.zig')
0 files changed, 0 insertions, 0 deletions
