A collection of mathematical problems, algorithms, and data structures implemented in Go to strengthen computational thinking, problem-solving skills, and algorithmic efficiency.
This repository documents my journey toward becoming a stronger problem solver through consistent practice with Go.
The focus is on understanding problems, developing algorithms, translating logical solutions into working code, and improving computational efficiency.
The goal is not simply to solve problems, but to understand why solutions work, how they perform, and how they can be improved.
- Mathematics: Number theory, prime numbers, combinatorics, sequences, and arithmetic problems.
- Arrays & Strings: Searching, manipulation, two pointers, and sliding windows.
- Sorting & Searching: Binary search, merge sort, quicksort, and other fundamental algorithms.
- Data Structures: Linked lists, stacks, queues, hash tables, heaps, and trees.
- Recursion & Backtracking: Recursive algorithms, permutations, and combinatorial problems.
- Graphs: Graph traversal, BFS, DFS, shortest paths, and connectivity.
- Bit Manipulation: Binary operations, bitwise algorithms, and optimization techniques.
- Dynamic Programming: Memoization, tabulation, and optimization problems.
- Problem Challenges: LeetCode, Project Euler, and other algorithmic exercises.
go-problem-solving/
├── mathematics/
├── arrays-and-strings/
├── searching/
├── sorting/
├── linked-lists/
├── stacks-and-queues/
├── trees/
├── graphs/
├── bit-manipulation/
├── recursion/
├── dynamic-programming/
├── project-euler/
└── README.md
Directories will be introduced progressively as problems are completed.
Each problem follows a consistent process:
- Understand: Identify the requirements, constraints, inputs, and expected outputs.
- Reason: Break the problem into smaller logical steps.
- Design: Develop an algorithm or pseudocode before implementation.
- Implement: Translate the solution into Go without relying on generated solutions.
- Test: Verify correctness using unit tests and edge cases.
- Analyze: Determine time and space complexity.
- Optimize: Explore alternative approaches where appropriate.
- Review: Revisit previous problems to reinforce understanding.
Solutions are tested using Go's built-in testing package.
Where applicable, tests include:
- Normal inputs
- Boundary conditions
- Edge cases
- Invalid inputs
- Performance benchmarks
Run tests:
go test ./...Run benchmarks:
go test -bench=. ./...- Prioritize understanding over memorization.
- Solve problems independently before consulting references.
- Prefer Go's standard library.
- Write readable and maintainable solutions.
- Understand the tradeoffs between different approaches.
- Practice consistently and revisit challenging problems.
- Treat testing and complexity analysis as part of problem solving.
Understand the problem. Design the algorithm. Write the code. Test the solution. Improve the approach.
Progress is measured by the ability to independently solve, explain, and optimize problems,not merely by the number of completed exercises.