Skip to content

Add solution for Challenge 3 by ForcemCS#1462

Merged
RezaSi merged 2 commits intoRezaSi:mainfrom
ForcemCS:challenge-3-ForcemCS
Mar 16, 2026
Merged

Add solution for Challenge 3 by ForcemCS#1462
RezaSi merged 2 commits intoRezaSi:mainfrom
ForcemCS:challenge-3-ForcemCS

Conversation

@ForcemCS
Copy link
Contributor

Challenge 3 Solution

Submitted by: @ForcemCS
Challenge: Challenge 3

Description

This PR contains my solution for Challenge 3.

Changes

  • Added solution file to challenge-3/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 28, 2026

Walkthrough

Introduces a new Go solution file implementing Employee and Manager types with fundamental management operations: adding employees, removing by ID, calculating average salary, and finding employees by ID. The implementation includes a main function demonstrating basic usage with nil checks for safe pointer dereferencing.

Changes

Cohort / File(s) Summary
Employee Management Implementation
challenge-3/submissions/ForcemCS/solution-template.go
Adds Employee struct (ID, Name, Age, Salary) and Manager struct with receiver methods: AddEmployee appends to slice, RemoveEmployee removes by ID with early exit, GetAverageSalary computes mean with empty-slice handling, and FindEmployeeByID returns pointer or nil. Main demonstrates usage with two employees, removal, average calculation, and safe nil-checked lookup.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 A manager hops through fields of code,
With employees stored in slice abode,
Adding, removing, finding with care,
Averaging salaries through the air!
Challenge-3's solved—let's celebrate near! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a solution for Challenge 3 by a specific user (ForcemCS), which matches the changeset content.
Description check ✅ Passed The description is directly related to the changeset, clearly explaining that it contains a Challenge 3 solution submission and specifying the file location.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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-3/submissions/ForcemCS/solution-template.go (1)

16-16: Consider using English for comments.

The comments are currently in Chinese. For broader accessibility in an open-source repository, English comments would be more inclusive for contributors and reviewers.


ℹ️ 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 cdf59c0.

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

@RezaSi RezaSi merged commit 27ed92c 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