mirror of
https://github.com/blindlobstar/go-interview-problems
synced 2025-04-26 11:45:15 +00:00
2.2 KiB
2.2 KiB
Contributing Guide
Thank you for considering contributing to go-interview-problems! This repository is a collection of brain teasers and real-life programming tasks to help developers prepare for interviews. Your contributions help make this resource even more valuable.
How to Contribute
You can contribute by:
- Adding a new interview problem.
- Improving existing problems.
- Refining solutions or providing alternative approaches.
- Fixing typos or improving documentation.
Adding a New Problem
To add a new problem, follow these steps:
- Create a new folder in the repository's root directory using the format:
<problem-number>-<problem-name>/
Example:
03-first-successful-key-lookup/
- Inside the problem folder, add the following files:
03-first-successful-key-lookup/
├── README.md # Problem description, tags, and source
├── task.go # Starter code for the problem
├── solution/
│ ├── solution.go # One or more possible solutions
- Fill out the
README.md
using this template:
# Name
<Short description of the problem>
## Tags
<tag1> <tag2>
## Source
- <Original source link, if applicable>
- Write the starter code (
task.go
) The starter code should include function signatures but not the full implementation. Example:
package main
import "context"
func Get(ctx context.Context, addresses []string, key string) (string, error) {
return "", nil
}
-
Add at least one solution in the
solution/
directory Provide a complete implementation insolution/solution.go
. -
Commit your changes and submit a pull request (PR)
- Ensure your code follows standard Go formatting (
gofmt
). - Keep problem descriptions clear and concise.
- Provide meaningful commit messages.
Best Practices
- Focus on real-life tasks and brain teasers, rather than purely algorithmic challenges.
- Use clear and consistent formatting.
- If your problem is inspired by an external source (e.g., a YouTube video), always credit the original author in the Source section.
- Keep problem difficulty balanced - it should be challenging yet solvable.