Skip to content

feat: Add Z Algorithm string search in R#176

Merged
siriak merged 1 commit into
TheAlgorithms:masterfrom
Arpita23r:feat/z-algorithm-arpi23r
Oct 11, 2025
Merged

feat: Add Z Algorithm string search in R#176
siriak merged 1 commit into
TheAlgorithms:masterfrom
Arpita23r:feat/z-algorithm-arpi23r

Conversation

@Arpita23r
Copy link
Copy Markdown
Contributor

  • Implemented Z Algorithm for pattern searching in R.
  • Efficient linear-time string matching using prefix computation.
  • Handles case-insensitive input.
  • Returns all positions of pattern occurrences in text.
  • Time Complexity: O(n + m)
  • Space Complexity: O(n)
  • Added interactive user input for testing.

@Arpita23r
Copy link
Copy Markdown
Contributor Author

Arpita23r commented Oct 10, 2025

Hi maintainers 👋, this is my first contribution. The checks are waiting for approval — please approve workflow runs. Thank you!

@siriak siriak requested a review from Copilot October 11, 2025 08:45
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements the Z Algorithm for efficient string pattern searching in R. The algorithm performs linear-time string matching using prefix computation and provides case-insensitive pattern searching functionality.

Key changes:

  • Added Z Algorithm implementation with O(n + m) time complexity
  • Included interactive user input for testing the algorithm
  • Implemented case-insensitive string matching

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread searches/z.algorithm.search.R
Comment thread searches/z.algorithm.search.R
Comment thread searches/z.algorithm.search.R
Copy link
Copy Markdown
Member

@siriak siriak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@siriak siriak merged commit 5bb7155 into TheAlgorithms:master Oct 11, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants