A curated collection of Data Structures and Algorithms problems implemented in Java.
This repository serves as a structured resource for learning, practicing, and mastering DSA concepts commonly asked in coding interviews and competitive programming platforms.
The solutions in this repository cover problems from platforms such as:
- LeetCode
- GeeksforGeeks
- Coding interview practice problems
The goal of this repository is to strengthen problem-solving skills and algorithmic thinking while maintaining clean and readable implementations.
The repository is organized topic-wise to make learning systematic and easy to navigate.
- Basic array manipulation
- Prefix sum
- Two pointer techniques
- Subarray problems
- Pattern matching
- String manipulation
- Palindrome problems
- Sliding window techniques
- Singly linked list
- Reversal techniques
- Cycle detection
- Merge operations
- Stack implementation
- Monotonic stack problems
- Next greater element
- Expression evaluation
- Queue implementation
- Circular queue
- Deque-based problems
- HashMap / HashSet usage
- Frequency counting
- Subarray with given sum
- Duplicate detection
- Basic recursion problems
- Backtracking preparation
- Recursive tree understanding
- Subset generation
- Permutations
- Combination problems
- Constraint solving
- Classic binary search
- Search in rotated array
- Lower/upper bound problems
- Binary Tree traversal
- Level order traversal
- Tree properties
- Tree recursion problems
- Insert / delete operations
- BST validation
- Floor and ceil
- Kth smallest element
- Prefix tree implementation
- Word search problems
- Dictionary matching
- Min heap / max heap
- Top K elements
- Heap based greedy problems
- BFS / DFS
- Topological sorting
- Cycle detection
- Shortest path algorithms
- Memoization
- Tabulation
- Knapsack patterns
- DP optimization
- Activity selection
- Interval scheduling
- Optimization strategies
- Bitwise operations
- XOR tricks
- Bitmasking techniques
- Fixed window
- Variable window
- Maximum/minimum subarray problems
- Range queries
- Range updates
- Lazy propagation
- Classic sorting algorithms
- Custom comparator usage
- Sorting based optimizations
- Traversal problems
- Spiral matrix
- Matrix transformations
- Path compression
- Union by rank
- Connected components problems
DSA
│
├── Arrays
├── Backtracking
├── Binary_Search_Tree
├── Bits
├── Dynamic_Programming
├── Graph
├── Greedy
├── Hashing
├── Heap
├── LinkedList
├── Matrix
├── Queue
├── Recursion
├── Searching
├── Segment_Tree
├── Sliding_Window
├── Sorting
├── Stack
├── String
├── Tree
├── Trie
└── DSU
Each folder contains Java implementations of problems related to that topic.
Java is used for all implementations.
Why Java?
- Strong standard library
- Object-oriented structure
- Widely used in coding interviews
- Efficient for algorithmic problem solving
This repository is created to:
- Practice Data Structures and Algorithms
- Prepare for coding interviews
- Build strong problem-solving skills
- Maintain organized DSA notes and implementations
This repository is useful for:
- Software engineers preparing for coding interviews
- Students learning Data Structures and Algorithms
- Developers practicing problems from coding platforms
- Anyone looking to strengthen algorithmic thinking
- Pick a topic you want to practice.
- Navigate to the corresponding folder.
- Read the problem implementation.
- Try solving the problem yourself before checking the solution.
Contributions are welcome.
If you'd like to improve solutions or add new problems:
- Fork the repository
- Add your implementation
- Create a pull request
This repository is open source and available for learning and educational purposes.