Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
corrected spelling mistakes
  • Loading branch information
Adrito-M committed Oct 29, 2022
commit 64c91101d7355285af0dcfc930e5045fb6f30136
2 changes: 1 addition & 1 deletion String/ZFunction.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function zFunction (text) {
zArray[index] = Math.min(right - index + 1, zArray[index - left])
}

// After zArray[index] is initialized, we see if we can increase its value by trivially comparing charcter by character
// After zArray[index] is initialized, we see if we can increase its value by trivially comparing character by character
while (
index + zArray[index] < length &&
text[zArray[index]] === text[index + zArray[index]]
Expand Down