Skip to content

Solution for Challenge 2#1838

Open
BernadetteAkinyi wants to merge 1 commit into
RezaSi:mainfrom
BernadetteAkinyi:challenge-2-BernadetteAkinyi
Open

Solution for Challenge 2#1838
BernadetteAkinyi wants to merge 1 commit into
RezaSi:mainfrom
BernadetteAkinyi:challenge-2-BernadetteAkinyi

Conversation

@BernadetteAkinyi

Copy link
Copy Markdown

Challenge 2 Solution

Submitted by: @BernadetteAkinyi
Challenge: Challenge 2

Description

This PR contains my solution for Challenge 2.

Changes

  • Added solution file to challenge-2/submissions/BernadetteAkinyi/solution-template.go

Testing

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

Thank you for reviewing my submission! 🚀

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

A new Go source file is added under challenge-2/submissions/BernadetteAkinyi/ that exports a ReverseString function. The function converts the input string to a rune slice, reverses it in place using a two-pointer swap, and returns the result as a string. The main function prints two hardcoded reversed strings.

Changes

Challenge 2 — ReverseString Submission

Layer / File(s) Summary
ReverseString implementation and main
challenge-2/submissions/BernadetteAkinyi/solution-template.go
Adds package main with fmt import, exports ReverseString(s string) string using rune-slice in-place two-pointer swapping, and implements main to call and print results for two example strings.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

🐇 A string walked in, "hello" it said,
I flipped it around — "olleh" instead!
With runes in a slice, two pointers I set,
The fastest reverse you haven't seen yet.
swap, swap, swap — the magic's done,
Reversing strings is oh-so fun! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Solution for Challenge 2' directly matches the changeset's main purpose—adding a solution file for Challenge 2.
Description check ✅ Passed The description is clearly related to the changeset, detailing the Challenge 2 solution submission, the file location, and test validation.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

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: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9a34d189-8799-461b-9979-80624cd1218c

📥 Commits

Reviewing files that changed from the base of the PR and between a4d6825 and 8e92876.

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

Comment thread challenge-2/submissions/BernadetteAkinyi/solution-template.go
Comment thread challenge-2/submissions/BernadetteAkinyi/solution-template.go
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