Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added z_algorithm in strings #1581

Merged
merged 20 commits into from
Sep 4, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

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
Apply suggestions from code review
More comments added to the code

Co-authored-by: David Leal <[email protected]>
  • Loading branch information
RitikaGupta8734 and Panquesito7 committed Sep 1, 2021
commit 9addf17de4dfdd8288dd1e7c66cee86e588c162f
10 changes: 5 additions & 5 deletions strings/z_function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
* @author [Ritika Gupta](https://github.com/RitikaGupta8734)
*/

#include <iostream>
#include <iostream> /// for IO operations
#ifdef _MSC_VER
#include <string> // use this for MS Visual C++
#include <string> /// for string (use this for MS Visual C++)
#else
#include <cstring>
#include <cstring> /// for string
#endif
#include <vector>
# include <cassert>
#include <vector> /// for std::vector
#include <cassert> /// for assert

/**
* Generate the Z-function for the inputted string.
RitikaGupta8734 marked this conversation as resolved.
Show resolved Hide resolved
Expand Down