Skip to content

Conversation

@SemenTretyakov
Copy link

Challenge 3 Solution

Submitted by: @SemenTretyakov
Challenge: Challenge 3

Description

This PR contains my solution for Challenge 3.

Changes

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

Walkthrough

A new Go solution file is introduced implementing an in-memory employee management system with Employee and Manager types, providing methods to add, remove, retrieve, and compute average salary of employees. The implementation includes a main function demonstrating basic usage of the system.

Changes

Cohort / File(s) Summary
Employee Management Solution
challenge-3/submissions/SemenTretyakov/solution-template.go
New file with Employee struct (ID, Name, Age, Salary) and Manager struct containing slice of employees. Implements four methods on Manager: AddEmployee (appends employee), RemoveEmployee (removes by ID), GetAverageSalary (returns average or 0 if empty), and FindEmployeeByID (returns pointer or nil). Main function demonstrates usage with two employees added, one removed, and salary computation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 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 'Add solution for Challenge 3 by SemenTretyakov' accurately describes the main change, which is adding a new solution file for Challenge 3. It is clear, specific, and directly related to the changeset.
Description check ✅ Passed The description is directly related to the changeset, providing context about the Challenge 3 solution submission and listing the specific file added. It adequately describes the change despite minimal detail.

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