Skip to content

This repository contains structured lessons for mastering Data Structures and Algorithms (DSA) using Golang. Each category (e.g., Arrays & Hashing, Two Pointers, etc.) contains multiple problems, and each problem has one or more solutions exploring different algorithmic strategies.

Notifications You must be signed in to change notification settings

kcsanjeeb/Data-Structures-and-Algorithm-Study

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

79 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧩 DSA Study using Golang

This repository contains structured lessons for mastering Data Structures and Algorithms (DSA) using Golang.
Each category (e.g., Arrays & Hashing, Two Pointers, etc.) contains multiple problems, and each problem has one or more solutions exploring different algorithmic strategies.


🧭 Table of Contents (auto-generated)

Problem Solution Approaches Time Complexity Space Complexity
Problem-01: Contains Duplicate Brute Force O(nΒ²) O(1)
Sorting O(n log n) O( 1 )
βœ… Hash Set O(n) O(n)
βœ… Hash Set Length O(n) O(n)
Problem-02: Valid Anagram Sorting O(n log n + m log m) O(n + m)
βœ… Hash Map O(n) O(k)
βœ… Hash Table (Using Array) O(n + m) O(1)
Problem-03: Two Sum Brute Force O(nΒ²) O(1)
Sorting + Two Pointers O(n log n) O(n)
βœ… Hash Map (Two Pass) O(n) O(n)
Hash Map (One Pass) O(n) O(n)
Problem-04: Group Anagrams Sorting O(n log n + m log m) O(1)
βœ… Hash Table O(n + m) O(1)
Problem-05: Top K Frequent Elements Sorting O(n log n) O(n)
Min-Heap O(n log k) O(n+k)
βœ… Bucket Sort O(n) O(n)
Problem Solution Approaches Time Complexity Space Complexity
Problem Solution Approaches Time Complexity Space Complexity
Problem Solution Approaches Time Complexity Space Complexity
Problem Solution Approaches Time Complexity Space Complexity
Problem Solution Approaches Time Complexity Space Complexity
Problem Solution Approaches Time Complexity Space Complexity
Problem Solution Approaches Time Complexity Space Complexity
Problem Solution Approaches Time Complexity Space Complexity
Problem Solution Approaches Time Complexity Space Complexity
Problem Solution Approaches Time Complexity Space Complexity
Problem Solution Approaches Time Complexity Space Complexity
Problem Solution Approaches Time Complexity Space Complexity
Problem Solution Approaches Time Complexity Space Complexity
Problem Solution Approaches Time Complexity Space Complexity
Problem Solution Approaches Time Complexity Space Complexity
Problem Solution Approaches Time Complexity Space Complexity
Problem Solution Approaches Time Complexity Space Complexity
Problem Solution Approaches Time Complexity Space Complexity

πŸ“š Theory

βš™οΈ How to Run Any Solution

# Example: run solution-01 of problem-01 in category-01
cd category-01/problem-01/solution-01
go run main.go

πŸ“ Repository Structure

How to install & use

Fully interactive (asks everything)

./dsa.sh category --interactive         # To create category
./dsa.sh problem --interactive          # To create problem
./dsa.sh solution --interactive         # To create solution
# Save
nano dsa.sh   # paste the script, save

# Make executable
chmod +x dsa.sh

# Create a category
./dsa.sh category --cat 1 --label "Arrays & Hashing"

# Add a problem (auto-picks next problem-XX)
./dsa.sh problem --cat 1 --prob auto --title "Contains Duplicate" --difficulty Easy --tags "Arrays,Hashing"

# Add a second problem later (no need to touch existing files)
./dsa.sh problem --cat 1 --prob auto --title "Valid Anagram" --difficulty Easy --tags "Arrays,Hashing,Strings"

# Add solutions any time (auto-picks next solution-XX)
./dsa.sh solution --cat 1 --prob 1 --sol auto --title "Solution-01: Brute Force" --approach "Brute Force" --tags "Brute Force,Intro"
./dsa.sh solution --cat 1 --prob 1 --sol auto --title "Solution-02: Sorting" --approach "Sorting" --tags "Sorting,Array"

# Fully interactive (asks everything)
./dsa.sh problem --interactive
./dsa.sh solution --interactive

About

This repository contains structured lessons for mastering Data Structures and Algorithms (DSA) using Golang. Each category (e.g., Arrays & Hashing, Two Pointers, etc.) contains multiple problems, and each problem has one or more solutions exploring different algorithmic strategies.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published