diff options
| author | Chris Boesch <chrboesch@noreply.codeberg.org> | 2024-05-06 07:25:18 +0000 |
|---|---|---|
| committer | Chris Boesch <chrboesch@noreply.codeberg.org> | 2024-05-06 07:25:18 +0000 |
| commit | 8345e839b09bd12947f547598fe9790859736023 (patch) | |
| tree | 9c6010e10ad6542366315864d0b5f645b6d5dbe4 /exercises/098_bit_manipulation2.zig | |
| parent | 1ac46d7a42ae90006c99f9c4a9bfdb435de30cac (diff) | |
| parent | 6c23f2682e08b8c24bca33a18dc1d9770259a061 (diff) | |
Merge pull request 'Fix some typos' (#89) from typos into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/89
Diffstat (limited to 'exercises/098_bit_manipulation2.zig')
| -rw-r--r-- | exercises/098_bit_manipulation2.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/exercises/098_bit_manipulation2.zig b/exercises/098_bit_manipulation2.zig index 64cea4b..979b103 100644 --- a/exercises/098_bit_manipulation2.zig +++ b/exercises/098_bit_manipulation2.zig @@ -1,5 +1,5 @@ // -// Another useful practice for bit manipulation is setting bits as flags. +// Another useful application for bit manipulation is setting bits as flags. // This is especially useful when processing lists of something and storing // the states of the entries, e.g. a list of numbers and for each prime // number a flag is set. @@ -19,9 +19,9 @@ // For example, you could take an array of bool and set the value to 'true' // for each letter in the order of the alphabet (a=0; b=1; etc.) found in // the sentence. However, this is neither memory efficient nor particularly -// fast. Instead we take a simpler way, very similar in principle, we define -// a variable with at least 26 bits (e.g. u32) and also set the bit for each -// letter found at the corresponding position. +// fast. Instead we choose a simpler approach that is very similar in principle: +// We define a variable with at least 26 bits (e.g. u32) and set the bit for +// each letter that is found in the corresponding position. // // Zig provides functions for this in the standard library, but we prefer to // solve it without these extras, after all we want to learn something. |
