Skip to content

Commit

Permalink
README fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
trekhleb committed Jan 22, 2022
1 parent 80d2f50 commit 7d13e68
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/algorithms/cryptography/caesar-cipher/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Caesar Cipher Algorithm

_Read this in other languages:_
[_Русский_](README.ru-RU.md)

In cryptography, a **Caesar cipher**, also known as **Caesar's cipher**, the **shift cipher**, **Caesar's code** or **Caesar shift**, is one of the simplest and most widely known encryption techniques. It is a type of substitution cipher in which each letter in the plaintext is replaced by a letter some fixed number of positions down the alphabet. For example, with a left shift of `3`, `D` would be replaced by `A`, `E` would become `B`, and so on. The method is named after Julius Caesar, who used it in his private correspondence.

![Caesar Cipher Algorithm](https://upload.wikimedia.org/wikipedia/commons/4/4a/Caesar_cipher_left_shift_of_3.svg)
Expand Down
2 changes: 1 addition & 1 deletion src/algorithms/linked-list/traversal/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Linked List Traversal

_Read this in other languages:_
[_Русский_](README.ru-RU.md)
[_Русский_](README.ru-RU.md),
[中文](README.zh-CN.md)

The task is to traverse the given linked list in straight order.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function knuthMorrisPratt(text, word) {
if (text[textIndex] === word[wordIndex]) {
// We've found a match.
if (wordIndex === word.length - 1) {
return textIndex - word.length + 1;
return (textIndex - word.length) + 1;
}
wordIndex += 1;
textIndex += 1;
Expand Down

0 comments on commit 7d13e68

Please sign in to comment.