Skip to content

Sai-02/DSA

Repository files navigation

DSA – Data Structures and Algorithms

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.


Topics Covered

The repository is organized topic-wise to make learning systematic and easy to navigate.

Arrays

  • Basic array manipulation
  • Prefix sum
  • Two pointer techniques
  • Subarray problems

Strings

  • Pattern matching
  • String manipulation
  • Palindrome problems
  • Sliding window techniques

Linked List

  • Singly linked list
  • Reversal techniques
  • Cycle detection
  • Merge operations

Stack

  • Stack implementation
  • Monotonic stack problems
  • Next greater element
  • Expression evaluation

Queue

  • Queue implementation
  • Circular queue
  • Deque-based problems

Hashing

  • HashMap / HashSet usage
  • Frequency counting
  • Subarray with given sum
  • Duplicate detection

Recursion

  • Basic recursion problems
  • Backtracking preparation
  • Recursive tree understanding

Backtracking

  • Subset generation
  • Permutations
  • Combination problems
  • Constraint solving

Binary Search

  • Classic binary search
  • Search in rotated array
  • Lower/upper bound problems

Tree

  • Binary Tree traversal
  • Level order traversal
  • Tree properties
  • Tree recursion problems

Binary Search Tree

  • Insert / delete operations
  • BST validation
  • Floor and ceil
  • Kth smallest element

Trie

  • Prefix tree implementation
  • Word search problems
  • Dictionary matching

Heap / Priority Queue

  • Min heap / max heap
  • Top K elements
  • Heap based greedy problems

Graph

  • BFS / DFS
  • Topological sorting
  • Cycle detection
  • Shortest path algorithms

Dynamic Programming

  • Memoization
  • Tabulation
  • Knapsack patterns
  • DP optimization

Greedy Algorithms

  • Activity selection
  • Interval scheduling
  • Optimization strategies

Bit Manipulation

  • Bitwise operations
  • XOR tricks
  • Bitmasking techniques

Sliding Window

  • Fixed window
  • Variable window
  • Maximum/minimum subarray problems

Segment Tree

  • Range queries
  • Range updates
  • Lazy propagation

Sorting

  • Classic sorting algorithms
  • Custom comparator usage
  • Sorting based optimizations

Matrix

  • Traversal problems
  • Spiral matrix
  • Matrix transformations

Disjoint Set Union (Union Find)

  • Path compression
  • Union by rank
  • Connected components problems

Repository Structure

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.


Language Used

Java is used for all implementations.

Why Java?

  • Strong standard library
  • Object-oriented structure
  • Widely used in coding interviews
  • Efficient for algorithmic problem solving

Purpose of This Repository

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

Who Is This For?

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

How to Use This Repository

  1. Pick a topic you want to practice.
  2. Navigate to the corresponding folder.
  3. Read the problem implementation.
  4. Try solving the problem yourself before checking the solution.

Contribution

Contributions are welcome.

If you'd like to improve solutions or add new problems:

  1. Fork the repository
  2. Add your implementation
  3. Create a pull request

License

This repository is open source and available for learning and educational purposes.

Releases

No releases published

Packages

 
 
 

Contributors

Languages