commit 50fd93c5a00281d7d02fe286d7d9303bc25c5c27 Author: blindlobstar <60821193+blindlobstar@users.noreply.github.com> Date: Thu Apr 3 20:21:41 2025 +0200 Initial commit initial commit diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..826e629 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,73 @@ +# 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: + +1. **Create a new folder** in the repository's root directory using the format: +```md +-/ +``` + +Example: +```md +03-first-successful-key-lookup/ +``` + +2. **Inside the problem folder, add the following files**: +```bash +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 +``` + +3. **Fill out the `README.md` using this template**: +```md +# Name + + +## Tags + + +## Source +- +``` + +4. **Write the starter code (`task.go`)** +The starter code should include function signatures but not the full implementation. Example: +```go +package main + +import "context" + +func Get(ctx context.Context, addresses []string, key string) (string, error) { + return "", nil +} +``` + +5. **Add at least one solution in the `solution/` directory** +Provide a complete implementation in `solution/solution.go`. + +6. **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. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6b93ce2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 blindlobstar + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..420ec9b --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# Go Interview Problems + +Welcome to the go-interview-problems repository! This repository is a collection of programming problems designed to help you practice +for technical interviews. These problems focus on real-world scenarios, including challenges that are commonly encountered in interviews at top tech companies. + +## Problems + +Here is a list of the problems available in the repository. Problems are organized by their respective tags: + +## Contributing + +We welcome contributions from anyone looking to add more problems, improve solutions, or provide better documentation. Please refer to +the [Contributing Guide](CONTRIBUTING.md) for detailed instructions on how to contribute to the repository. + +## License + +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..3b0e019 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/blindlobstar/go-interview-problems + +go 1.24.1