Skip to content

Add solution for Challenge 2 by shansing#1432

Open
shansing wants to merge 2 commits intoRezaSi:mainfrom
shansing:challenge-2-shansing
Open

Add solution for Challenge 2 by shansing#1432
shansing wants to merge 2 commits intoRezaSi:mainfrom
shansing:challenge-2-shansing

Conversation

@shansing
Copy link
Contributor

Challenge 2 Solution

Submitted by: @shansing
Challenge: Challenge 2

Description

This PR contains my solution for Challenge 2.

Changes

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

Testing

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

Thank you for reviewing my submission! 🚀

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a7ac764 and dc30c06.

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

Walkthrough

A new Go solution file is introduced that implements a string reversal program. The implementation reads a single line from standard input, reverses the string using an exported ReverseString function that converts input to runes and performs in-place character swapping, and outputs the result.

Changes

Cohort / File(s) Summary
String Reversal Challenge Solution
challenge-2/submissions/shansing/solution-template.go
Adds ReverseString function converting string to runes and in-place swapping characters from both ends until middle is reached. Main program reads stdin line, calls ReverseString, and prints result.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 A string walks in backwards today,
Through rune-swapping magic at play,
From left to the right, we flip every bite,
Till palindromes smile in their way! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding a solution for Challenge 2 by the contributor shansing.
Description check ✅ Passed The description is directly related to the changeset, providing context about the Challenge 2 submission and clearly explaining what was added.

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


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 and usage tips.

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