Skip to content

Add solution for Challenge 6 by ForcemCS#1459

Merged
RezaSi merged 1 commit intoRezaSi:mainfrom
ForcemCS:challenge-6-ForcemCS
Mar 16, 2026
Merged

Add solution for Challenge 6 by ForcemCS#1459
RezaSi merged 1 commit intoRezaSi:mainfrom
ForcemCS:challenge-6-ForcemCS

Conversation

@ForcemCS
Copy link
Contributor

Challenge 6 Solution

Submitted by: @ForcemCS
Challenge: Challenge 6

Description

This PR contains my solution for Challenge 6.

Changes

  • Added solution file to challenge-6/submissions/ForcemCS/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 27, 2026

Walkthrough

This PR adds a new Go file containing a solution for Challenge 6. The implementation provides a CountWordFrequency function that tokenizes input text into alphanumeric words, converts them to lowercase, excludes apostrophes, and returns a map of word frequency counts.

Changes

Cohort / File(s) Summary
Challenge 6 Solution
challenge-6/submissions/ForcemCS/solution-template.go
Introduces CountWordFrequency(text string) map[string]int function that processes text character-by-character to extract alphanumeric words, normalize them to lowercase, and accumulate frequency counts in a map. Includes internal helper functions for alphanumeric validation and character lowercasing.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • go-interview-practice#609: Implements the same exported CountWordFrequency function signature and word-frequency logic in the challenge6 package.
  • go-interview-practice#1198: Provides a nearly identical implementation of word tokenization, lowercase normalization, apostrophe handling, and counting logic.
  • go-interview-practice#695: Adds the same function using rune-by-rune tokenization with helper functions for alphanumeric and delimiter checks.

Poem

🐰 Hop, skip, and count each word so fine,
Alphanumeric threads in a lexical line!
Apostrophes ignored, lowercase the way,
A frequency map builds throughout the day! 📊

🚥 Pre-merge checks | ✅ 2 | ❌ 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 (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding a solution file for Challenge 6 by a specific contributor.
Description check ✅ Passed The description is directly related to the changeset, explaining the Challenge 6 solution submission and listing the changes made.

✏️ 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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
challenge-6/submissions/ForcemCS/solution-template.go (1)

26-29: Inconsistent indentation.

Lines 27-29 appear to use spaces while the rest of the file uses tabs. Consider running gofmt to normalize formatting.


ℹ️ 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 3cec361.

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

@RezaSi RezaSi merged commit 5e2d41b into RezaSi:main Mar 16, 2026
5 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.

2 participants