Initial commit

initial commit
This commit is contained in:
blindlobstar 2025-04-03 20:21:41 +02:00 committed by blindlobstar
commit 50fd93c5a0
4 changed files with 114 additions and 0 deletions

73
CONTRIBUTING.md Normal file
View File

@ -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
<problem-number>-<problem-name>/
```
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
<Short description of the problem>
## Tags
<tag1> <tag2>
## Source
- <Original source link, if applicable>
```
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.

21
LICENSE Normal file
View File

@ -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.

17
README.md Normal file
View File

@ -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.

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module github.com/blindlobstar/go-interview-problems
go 1.24.1