This repository is a structured collection of Java programs covering the complete spectrum of Data Structures and Algorithms (DSA). It serves as a go-to reference and learning tool for beginners and intermediate learners preparing for technical interviews, coding contests, or academic assignments.
The project is organized into topic-wise directories, each containing Java source files demonstrating concepts, patterns, and problems.
.
βββ App.java / App.class # Entry point or test class
βββ index.js # Optional front-end or visualization aid
βββ Arrays/ # Array operations & basics
βββ Bits/ # Bit manipulation techniques
βββ DynamicProgramming/ # Classical DP problems (LIS, coin change, etc.)
βββ Graph/ # Directed, Undirected Graphs, Union-Find
βββ Greedy/ # Greedy approach and examples
βββ HashMap/ # HashMap use cases and methods
βββ Heap/ # Heap structure and its methods
βββ LinkedList/ # Linked List operations and patterns
βββ Matrix/ # 2D matrix problems and algorithms
βββ Queue/ # Queue operations and types
βββ Recursion/ # Recursive algorithms and backtracking
βββ SearchingAndSorting/ # Classic search/sort techniques
βββ Stack/ # Stack implementation and usage
βββ Tree/ # BST, AVL, Binary & Generic Trees
βββ Trie/ # Prefix tree structure and methods
- Language: Java
- Tools: Any Java IDE (IntelliJ IDEA, VSCode, Eclipse)
- Compilation:
javac
,java
CLI or IDE run tools
-
Clone this repository:
git clone https://github.com/your-username/java-dsa-handbook.git cd java-dsa-handbook
-
Compile and run any file (e.g.
App.java
)javac App.java java App
-
Or open the folder in your IDE and explore modules interactively.
Module | Topics Included |
---|---|
Arrays | Traversal, prefix sums, sliding window |
Bits | XOR, shifts, bit masking |
Dynamic Programming | LIS, Catalan, Coin Change, String Matching |
Graph | DFS, BFS, Union-Find, Adjacency list |
Greedy | Activity selection, Huffman coding basics |
HashMap | Frequency count, custom hashing |
Heap | Priority Queue, Min/Max Heaps |
LinkedList | Singly/Double LL, reversal, merging |
Matrix | Search in matrix, spiral traversal |
Queue | Linear & Circular Queues, Deque |
Recursion | Backtracking, subsequences, permutations |
Searching & Sorting | Binary search, merge/quick sort |
Stack | Balanced parentheses, infix to postfix |
Tree | BST, AVL, Binary Tree traversal, Generic Trees |
Trie | Prefix Tree creation, search, insertion |
- π Students preparing for DSA courses and college exams
- πΌ Job seekers preparing for coding rounds in companies
- π§βπ» Developers refreshing core DSA fundamentals
- π Competitive coders looking to organize solutions
In addition to the code, this repository is supplemented with 1000+ curated DSA questions categorized by topic along with detailed theory notes.
π Access the complete DSA question bank & theory notes
This document is ideal for:
- Interview preparation
- Practice on LeetCode, GFG, etc.
- Topic-wise revision and concept reinforcement
Udit Jain
- π Portfolio: uditjain100.github.io
- π« Email: jain30udit@gmail.com
- π§βπ» GitHub: @uditjain100