Skip to content

Add solution for Challenge 3 by nasseredine#1252

Open
nasseredine wants to merge 1 commit intoRezaSi:mainfrom
nasseredine:challenge-3-nasseredine
Open

Add solution for Challenge 3 by nasseredine#1252
nasseredine wants to merge 1 commit intoRezaSi:mainfrom
nasseredine:challenge-3-nasseredine

Conversation

@nasseredine
Copy link
Contributor

@nasseredine nasseredine commented Jan 31, 2026

Submitted by: @nasseredine
Challenge: Challenge 3

Description

This PR contains my solution for Challenge 3.

Changes

Added solution file to challenge-3/submissions/nasseredine/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 Jan 31, 2026

Walkthrough

Adds two new Go solutions: a challenge-3 Employee/Manager implementation with CRUD-like manager methods and a challenge-6 word-frequency function exposing CountWordFrequency(text string) map[string]int.

Changes

Cohort / File(s) Summary
Challenge 3 — Employee/Manager
challenge-3/submissions/nasseredine/solution-template.go
Adds Employee and Manager types; implements AddEmployee, RemoveEmployee(id int), GetAverageSalary() float64, FindEmployeeByID(id int) *Employee; includes a main demonstrating usage. Uses slices.IndexFunc for lookups.
Challenge 6 — Word Frequency
challenge-6/submissions/nasseredine/solution-template.go
Adds CountWordFrequency(text string) map[string]int and internal flushToken helper; tokenizes input into lowercase alphanumeric words and returns frequency map.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • RezaSi/go-interview-practice#581: Adds the same Challenge 3 Employee and Manager implementation (same types and manager methods).
  • RezaSi/go-interview-practice#1089: Adds matching Challenge 3 Employee/Manager implementation with identical methods and usage example.
  • RezaSi/go-interview-practice#664: Adds the same CountWordFrequency(text string) map[string]int implementation in challenge-6.
🚥 Pre-merge checks | ❌ 3
❌ Failed checks (3 warnings)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title mentions Challenge 3, but the changeset includes solutions for both Challenge 3 and Challenge 6, making the title incomplete and misleading. Update the title to reflect both challenges, e.g., 'Add solutions for Challenge 3 and Challenge 6 by nasseredine'.
Description check ⚠️ Warning The description only mentions Challenge 3, but the changeset includes solutions for both Challenge 3 and Challenge 6, creating a mismatch with the actual changes. Update the description to acknowledge and document both Challenge 3 and Challenge 6 solutions.
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.

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

@nasseredine nasseredine force-pushed the challenge-3-nasseredine branch from a4e8269 to a78ee93 Compare February 1, 2026 15:53
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