Hey there, fellow developer!
Whether you're just starting your Java journey or looking to strengthen your algorithmic problem-solving skills, you’re in the right place.
This repository is built for beginners and enthusiasts alike — to help you learn, practice, and master algorithms through clear explanations, well-commented Java code, and hands-on exercises.
Every algorithm here is designed to make learning fun, practical, and easy to understand, no matter your experience level.
“The best way to learn algorithms is not just to read them — it’s to build them, run them, and break them.”
- Bubble Sort
- Selection Sort
- Insertion Sort
- Merge Sort
- Quick Sort
- Heap Sort
- Counting Sort
- Linear Search
- Binary Search
- Jump Search
- Interpolation Search
- Hash Function Implementations
- HashMap from Scratch
- Collision Handling (Chaining & Open Addressing)
- Fibonacci Sequence (Top-Down & Bottom-Up)
- 0/1 Knapsack Problem
- Longest Common Subsequence (LCS)
- Coin Change Problem
- Matrix Chain Multiplication
- Breadth-First Search (BFS)
- Depth-First Search (DFS)
- Dijkstra’s Shortest Path
- Bellman-Ford Algorithm
- Floyd-Warshall Algorithm
- Topological Sorting
- Kruskal’s Minimum Spanning Tree (MST)
- Prim’s Minimum Spanning Tree
- Huffman Coding
- Activity Selection Problem
- Palindrome Checker
- Anagram Checker
- KMP Pattern Matching
- Rabin-Karp Algorithm
- Longest Common Prefix
- String Reversal
- Clone the repository
git clone ... cd ... - Compile and run any algorithm
- Explore, learn, and modify the algorithms as you go!
Contributions are welcome! To add or improve an algorithm:
-
Fork this repo
-
Create a new branch (feature/your-feature-name)
-
Add your algorithm with a short explanation and complexity
-
Submit a pull request
- Follow consistent Java naming conventions
- Comment your logic clearly
- Include time and space complexity
If you find this project helpful, please ⭐ star the repo!