From 3020a92282e1e15ebe798c2ef11735fab02f1e73 Mon Sep 17 00:00:00 2001 From: Steve Moyer Date: Sun, 7 Feb 2021 07:39:44 -0500 Subject: [PATCH] Fixes description of depth optimization --- src/ch02-01-flat-tree.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch02-01-flat-tree.md b/src/ch02-01-flat-tree.md index e0eff5b..fc7a672 100644 --- a/src/ch02-01-flat-tree.md +++ b/src/ch02-01-flat-tree.md @@ -113,7 +113,7 @@ expose the index so it can be stored or used for other computations. ## Optimizations ### Calculate Depth -The depth of a node can be calculated by counting the number of tailing zeros in +The depth of a node can be calculated by counting the number of tailing ones in a number. Languages such as Rust expose `.trailing_zeros()` which counts the amount of zeros at the end of a number (`cttz` intrinsic). By combining a bitwise negation (`!` or `NOT` operation) with the `.trailing_zeros()` method,