This repository is a collection of Go (Golang) programming exercises commonly encountered in technical interviews. Each exercise is organized in its own folder and focuses on a classic algorithmic or data structure problem, providing hands-on practice for candidates preparing for coding interviews.
- Each subfolder (e.g.,
2 - container_most_water,5 - move_zeros, etc.) contains a self-contained Go solution to a specific interview problem. - Solutions include clear documentation and comments to help you understand the approach and logic.
Some of the key algorithmic topics and problems included:
- Two pointers and array manipulation (e.g., Container With Most Water, Move Zeros)
- Hash map and frequency counting (e.g., Contains Duplicates, 4Sum II)
- Searching and sorting (e.g., Binary Search, First and Last Position)
- Bitwise operations (e.g., Single Number)
- Math and combinatorics (e.g., Count Primes, Missing Number)
- Sliding window techniques (e.g., Longest Substring Without Repeating Characters)
- Browse to any problem folder.
- Open the
main.gofile to read the problem description, code, and documentation. - Run the code using:
from within the problem's folder.
go run main.go
- Candidates preparing for Go technical interviews.
- Anyone looking to improve their problem-solving skills in Go.
- Interviewers seeking ready-made exercises for interviews.
Feel free to add more exercises, improve documentation, or suggest optimizations!
Happy coding and good luck with your interviews!