Skip to content

Add solution for Challenge 23 by JoQCorreia#1885

Merged
github-actions[bot] merged 1 commit into
RezaSi:mainfrom
JoQCorreia:challenge-23-JoQCorreia
Jul 14, 2026
Merged

Add solution for Challenge 23 by JoQCorreia#1885
github-actions[bot] merged 1 commit into
RezaSi:mainfrom
JoQCorreia:challenge-23-JoQCorreia

Conversation

@JoQCorreia

Copy link
Copy Markdown
Contributor

Challenge 23 Solution

Submitted by: @JoQCorreia
Challenge: Challenge 23

Description

This PR contains my solution for Challenge 23.

Changes

  • Added solution file to challenge-23/submissions/JoQCorreia/solution-template.go

Testing

  • Solution passes all test cases
  • Code follows Go best practices

Thank you for reviewing my submission! 🚀

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Adds three exported Go string pattern-matching functions—naive, KMP, and Rabin–Karp—plus a main harness that runs hardcoded examples and prints matching start indices.

Changes

Pattern matching submission

Layer / File(s) Summary
Naive and KMP search algorithms
challenge-23/submissions/JoQCorreia/solution-template.go
Adds brute-force matching and LPS-based KMP searches, including edge-case handling and all matching positions.
Rabin–Karp rolling-hash search
challenge-23/submissions/JoQCorreia/solution-template.go
Adds rolling hash updates, negative-hash normalization, and character verification for matching windows.
Executable comparison harness
challenge-23/submissions/JoQCorreia/solution-template.go
Adds hardcoded examples and prints the results from all three algorithms.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Poem

Three methods hop through strings with care,
Naive, KMP, and hashes share,
Windows roll and matches gleam,
Indices print like carrots in a dream.
“Good code!” cheers the rabbit team.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding a solution for Challenge 23.
Description check ✅ Passed The description is directly related to the submitted Challenge 23 solution and its testing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies"


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6ba32d13-97a2-4a2d-848d-23da393e0ad2

📥 Commits

Reviewing files that changed from the base of the PR and between cd81382 and 8d68429.

📒 Files selected for processing (1)
  • challenge-23/submissions/JoQCorreia/solution-template.go

Comment thread challenge-23/submissions/JoQCorreia/solution-template.go
@github-actions
github-actions Bot merged commit 8af880e into RezaSi:main Jul 14, 2026
6 checks passed
@github-actions

Copy link
Copy Markdown

🎉 Auto-merged!

This PR was automatically merged after 2 days with all checks passing.

Thank you for your contribution, @JoQCorreia!

📊 Scoreboards and badges will be updated shortly.

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.

1 participant