mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-02-11 22:46:39 +08:00
Update strings/z_function.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* 1. The Z-function for a string is an array of length n where the
|
||||
* i-th element is equal to the greatest number of characters starting
|
||||
* from the position i that coincide with the first characters of s.
|
||||
* 2. Eg string : ababb then z[2]=2 as s[2]=s[0] and s[3]=s[1] and s[4]!=s[2]
|
||||
* 2. E.g.: string: ababb then z[2]=2 as s[2]=s[0] and s[3]=s[1] and s[4]!=s[2]
|
||||
* @author [Ritika Gupta](https://github.com/RitikaGupta8734)
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user