This pull request aims at closing the issue #765 by fixing the typo in the translation.
Specifically,
Get Bit and Clear Bit, there should be AND operation (&), but not ADD operation (+)
Co-authored-by: Oleksii Trekhleb <trehleb@gmail.com>
- typos
- reformulação de "This structure allows for efficient insertion or removal of elements from any position in the sequence during iteration."
- "vinculadas" a "encadeadas" pra manter o mesmo termo do título
Co-authored-by: Oleksii Trekhleb <trehleb@gmail.com>
When `n.next = tail` is true, we assign `n` to `tail` and `null` to `tail.next`, so `n.next` also becomes `null`. Then we assign `n.next.next` (because now `n.next` is `null`), we try to get `next` of `null`. That is why we should add an `else` case to check if `n.next` is not equal to `tail`.
Co-authored-by: Oleksii Trekhleb <trehleb@gmail.com>
* Add the link to the Weighted Random algorithm to the main README.
* Add Weighted Random implementation and tests.
* Add Weighted Random README.
* Add Weighted Random README.
* Add Weighted Random README.
* Add "Binary representation of floating point numbers" section.
* Adding a half-precision explanatory picture.
* Binary representation of the floating-point numbers.
* Test that two images are identical for the Seam Carving algorithm.
* Tune the Seam Carving tests.
* Tune the Seam Carving tests.
* Tune the Seam Carving tests.
* Tune the Seam Carving tests.
The existing insertion sort implementation began by iterating from
0 until the end of the array, but it is only necessary to
iterate from 1 until the end of the array, since at the
0th index, there is nothing to compare to the left of
the element.
In order to complete this change, I also had to update the tests
to reflect the fact that the algorithm visits each index 1 less
time.
Finally, I corrected the grammar/wording of the comments.
Co-authored-by: Oleksii Trekhleb <trehleb@gmail.com>
* Add word to avoid misinterpretation
* Rename the CI workflow file.
Co-authored-by: Sagid Magomedov <sagid-m@yandex-team.ru>
Co-authored-by: Oleksii Trekhleb <trehleb@gmail.com>
* Add rail fence cipher encoder & decoder
* Add functions to encode & decode strings using the rail fence cipher method
* Add unit tests covering empty strings, pair & odd number of characters in the input string, n=3 & n=4
* Add a README.md for the algorithm
* Update root README.md to link to the new algorithm
* Rename the CI workflow file.
Co-authored-by: Oleksii Trekhleb <trehleb@gmail.com>