Skip to content

Conversation

@danielxfeng
Copy link

Challenge 3 Solution

Submitted by: @danielxfeng
Challenge: Challenge 3

Description

This PR contains my solution for Challenge 3.

Changes

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

Walkthrough

Adds a new Go solution file for challenge-3 that implements Employee and Manager types with public methods for adding, removing, and querying employees, plus computing average salary. Includes an internal helper method and a main function demonstrating basic operations.

Changes

Cohort / File(s) Summary
Challenge 3 Solution
challenge-3/submissions/danielxfeng/solution-template.go
Adds Employee struct and Manager type with public methods: AddEmployee (appends to slice), RemoveEmployee (locates and removes by ID), FindEmployeeByID (returns pointer match), GetAverageSalary (computes mean). Includes internal FindEmployeeIdxByID helper and main function demonstrating CRUD operations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • #823: Implements identical Employee and Manager types with the same four public methods for challenge-3.
  • #895: Adds the same Employee and Manager implementation with AddEmployee, RemoveEmployee, GetAverageSalary, and FindEmployeeByID methods in challenge-3/submissions.
  • #1099: Implements matching Employee and Manager types with identical methods (AddEmployee, RemoveEmployee, GetAverageSalary, FindEmployeeByID) for challenge-3 solutions.
🚥 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 and specifically identifies the main change: adding a solution for Challenge 3 by a particular contributor.
Description check ✅ Passed The description is directly related to the changeset, explaining the Challenge 3 solution submission with details about what was added and testing claims.

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