Skip to content

Commit 2ade267

Browse files
minhsun-cJonathan Corbet
authored andcommitted
Docs/core-api: fix typos in rbtree.rst
Correct minor typographical errors in the red-black tree documentation: - Remove redundant "a" in the cached rbtrees section. - Fix "updated" to "update" in the augmented rbtrees section. - Fix "be looking" to "by looking" in the interval tree sample usage. Signed-off-by: Min-Hsun Chang <chmh0624@gmail.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <20260210060829.42975-1-chmh0624@gmail.com>
1 parent 47cb33c commit 2ade267

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Documentation/core-api/rbtree.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ Cached rbtrees
197197
--------------
198198

199199
Computing the leftmost (smallest) node is quite a common task for binary
200-
search trees, such as for traversals or users relying on a the particular
200+
search trees, such as for traversals or users relying on the particular
201201
order for their own logic. To this end, users can use 'struct rb_root_cached'
202202
to optimize O(logN) rb_first() calls to a simple pointer fetch avoiding
203203
potentially expensive tree iterations. This is done at negligible runtime
@@ -255,7 +255,7 @@ affected subtrees.
255255

256256
When erasing a node, the user must call rb_erase_augmented() instead of
257257
rb_erase(). rb_erase_augmented() calls back into user provided functions
258-
to updated the augmented information on affected subtrees.
258+
to update the augmented information on affected subtrees.
259259

260260
In both cases, the callbacks are provided through struct rb_augment_callbacks.
261261
3 callbacks must be defined:
@@ -293,7 +293,7 @@ way making it possible to do efficient lookup and exact match.
293293

294294
This "extra information" stored in each node is the maximum hi
295295
(max_hi) value among all the nodes that are its descendants. This
296-
information can be maintained at each node just be looking at the node
296+
information can be maintained at each node just by looking at the node
297297
and its immediate children. And this will be used in O(log n) lookup
298298
for lowest match (lowest start address among all possible matches)
299299
with something like::

0 commit comments

Comments
 (0)