Skip to content

Add solution for Challenge 6 by sreehari-k-19#1743

Open
sreehari-k-19 wants to merge 2 commits into
RezaSi:mainfrom
sreehari-k-19:challenge-6-sreehari-k-19
Open

Add solution for Challenge 6 by sreehari-k-19#1743
sreehari-k-19 wants to merge 2 commits into
RezaSi:mainfrom
sreehari-k-19:challenge-6-sreehari-k-19

Conversation

@sreehari-k-19
Copy link
Copy Markdown
Contributor

Challenge 6 Solution

Submitted by: @sreehari-k-19
Challenge: Challenge 6

Description

This PR contains my solution for Challenge 6.

Changes

  • Added solution file to challenge-6/submissions/sreehari-k-19/solution-template.go

Testing

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

Thank you for reviewing my submission! 🚀

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 30, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6dd8736c-d759-448a-875d-e9ce111d2496

📥 Commits

Reviewing files that changed from the base of the PR and between aa037e3 and fffe42c.

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

Walkthrough

A new Go file introduces the CountWordFrequency function that normalizes input text by lowercasing and removing apostrophes, tokenizes by splitting on non-letter and non-digit boundaries, and returns a map of each token to its occurrence count.

Changes

Word Frequency Counting

Layer / File(s) Summary
CountWordFrequency function
challenge-6/submissions/sreehari-k-19/solution-template.go
The exported CountWordFrequency(text string) map[string]int function normalizes input by converting to lowercase and removing apostrophes, then tokenizes the text by splitting on non-alphanumeric boundaries and counts the frequency of each resulting token in a returned map.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related PRs

  • RezaSi/go-interview-practice#1542: Adds the same Challenge 6 solution function CountWordFrequency(text string) map[string]int in solution-template.go, implementing identical text normalization and word-frequency counting logic.
  • RezaSi/go-interview-practice#653: Adds a CountWordFrequency(text string) map[string]int implementation in Challenge 6 to produce a normalized word/token frequency map with the same core functionality.
  • RezaSi/go-interview-practice#1719: Adds the CountWordFrequency(text string) map[string]int function for Challenge 6 with the same tokenization and frequency counting logic in a different submission.

Poem

🐰 A rabbit counts words with glee,
Stripping apostrophes free,
Lowercased tokens in a map,
Frequencies tabbed without a gap!
Simple, swift, and clean—what a snap! 🐇

🚥 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 clearly and specifically identifies the main change: adding a solution for Challenge 6 by a specific contributor.
Description check ✅ Passed The description is directly related to the changeset, clearly explaining the solution submission for Challenge 6 with relevant details about the file added and testing claims.
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 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