feat: added z_algorithm in strings (#1581)

* feat: added z_algorithm in strings

* Updated z_function.cpp 

Updated z_function.cpp as per contribution guidelines.
Fixed Link using github markdown syntax
Created a separate function for tests and covered the corner case

* Apply suggestions from code review

More comments added to the code

Co-authored-by: David Leal <halfpacho@gmail.com>

* Apply suggestions from code review

Some more documentation added as per contribution guidelines.

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update strings/z_function.cpp

comments added

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update strings/z_function.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for 0c7515e9

* Updated int -> uint64_t 

Updated int -> uint64_t for non-negative values

* clang-format and clang-tidy fixes for 12d51239

* Update strings/z_function.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update strings/z_function.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* More comments added

* clang-format and clang-tidy fixes for 8a627ac9

* Update strings/z_function.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update strings/z_function.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
RitikaGupta8734
2021-09-04 12:39:19 +05:30
committed by GitHub
parent 341ed50da8
commit b82e2cd4e7
2 changed files with 97 additions and 0 deletions

View File

@@ -334,3 +334,4 @@
* [Knuth Morris Pratt](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/strings/knuth_morris_pratt.cpp)
* [Manacher Algorithm](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/strings/manacher_algorithm.cpp)
* [Rabin Karp](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/strings/rabin_karp.cpp)
* [Z Function](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/strings/z_function.cpp)