Skip to content

RamitRoshan/DSA

Repository files navigation

📘 Data Structures and Algorithms in Java

Welcome to the Data Structures and Algorithms in Java repository!
This repository provides a comprehensive collection of Java implementations for various data structures and algorithms commonly used in computer science, competitive programming, and technical interviews.

Whether you're a beginner starting your DSA journey or an experienced developer revisiting the core concepts, this repository is a helpful resource designed for clear understanding and practical application.


📚 Table of Contents


🧾 Introduction

Data Structures and Algorithms (DSA) are the foundation of efficient programming. Mastering DSA helps you:

  • Write optimal code
  • Solve complex problems efficiently
  • Prepare for coding interviews at top tech companies

This repository aims to provide:

  • Clean, readable Java implementations
  • Conceptual explanations and comments
  • Real-world use cases and patterns

🔗 Resources

Topic Resource(s)
LinkedList, Searching & Sorting Kunal Kushwaha
Stacks & Queues Pepcoding
Trees & BSTs Take U Forward
Recursion Pepcoding
Dynamic Programming Take U Forward
Graphs Take U Forward
Heaps Anuj Bhaiya
Greedy Algorithms DSA Playlist (Check link in YouTube description)
Algorithms Questions TechDose, Take U Forward, CodeNCode, Fraz, Pepcoding

🧭 Guide

A beginner-friendly learning roadmap curated by Striver.


🧪 Practice


🗃️ Data Structures

📌 Arrays

Simple, linear data structures. This section includes:

  • Traversal, Insertion, Deletion
  • Two-pointer and Sliding Window techniques
  • Prefix sums and Kadane’s Algorithm

🔗 Linked Lists

Includes:

  • Singly Linked List
  • Doubly Linked List
  • Circular Linked List
  • Operations like reversal, detection of cycles, etc.

🥞 Stacks

LIFO structure with:

  • Array & LinkedList implementations
  • Use-cases like balanced parentheses, Next Greater Element, etc.

📬 Queues

FIFO structure:

  • Linear Queue
  • Circular Queue
  • Deque
  • Queue using Stacks & Vice Versa

🌳 Trees

Covers:

  • Binary Trees
  • Binary Search Trees (BST)
  • Tree traversals (DFS, BFS)
  • Height, Diameter, LCA, etc.

🔗 Graphs

Graph topics include:

  • Representations (Adjacency Matrix/List)
  • DFS, BFS
  • Cycle detection, Topological Sort
  • Dijkstra’s & Prim’s algorithms

🗂️ Hash Tables

HashMap & HashSet-based problems:

  • Frequency count
  • Two Sum, Group Anagrams
  • Collision handling

📐 Algorithms

📊 Sorting

  • Bubble Sort
  • Selection Sort
  • Insertion Sort
  • Merge Sort
  • Quick Sort
  • Heap Sort
  • Counting/Radix Sort (if applicable)

🔍 Searching

  • Linear Search
  • Binary Search (Iterative/Recursive)
  • Applications: Rotated Arrays, First/Last Occurrence, etc.

🌉 Graph Algorithms

  • DFS, BFS
  • Dijkstra’s
  • Bellman-Ford
  • Floyd-Warshall
  • Union-Find / Disjoint Set

🧠 Dynamic Programming

  • Memoization & Tabulation
  • Classic problems: Knapsack, LIS, LCS, etc.

💰 Greedy Algorithms

  • Activity Selection
  • Fractional Knapsack
  • Huffman Coding (if applicable)

🤝 Contributing

Contributions are welcome! 🚀
If you have new implementations, optimizations, or documentation improvements:

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Submit a pull request

Please ensure your code:

  • Is readable and well-commented
  • Includes example inputs if necessary
  • Follows Java best practices

Refer to CONTRIBUTING.md (coming soon) for detailed guidelines.


📄 License

This repository is licensed under the MIT License.
You are free to use, modify, and distribute the code for personal or commercial use.

See the LICENSE file for full details.


✨ Happy Coding & Keep Practicing!

About

DSA in Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages