Skip to content

DSA-Programs is a collection of Data Structures and Algorithms. It provides practical examples, detailed explanations, and ASCII diagrams to help you learn and master key DSA concepts like Arrays, Linked Lists, Stacks, Trees, Graphs, and sorting algorithms.

License

Notifications You must be signed in to change notification settings

Thre4dripper/DSA-Programs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š DSA-Programs

Welcome to the DSA-Programs repository! This project offers a comprehensive collection of Data Structures and Algorithms (DSA) implemented in various programming languages. Whether you're a beginner or an experienced developer, you'll find valuable resources to enhance your understanding of DSA concepts.

πŸš€ Features

  • Array ADT: Basic operations on arrays.
  • Matrix: Matrix manipulations and operations.
  • Linked Lists: Singly, Doubly, and Circular Linked Lists.
  • Stacks and Queues: Implementation of stacks, queues, and their variations.
  • Trees: Binary Trees, Binary Search Trees, AVL Trees, and Heaps.
  • Sorting Algorithms: Various sorting techniques.
  • Hashing: Hash table implementations.
  • Graphs: Graph algorithms and representations.

πŸ“‚ Project Structure

β”œβ”€β”€ .gitignore
β”œβ”€β”€ .vscode/
β”‚   β”œβ”€β”€ launch.json
β”‚   β”œβ”€β”€ settings.json
β”‚   └── tasks.json
β”œβ”€β”€ 01. Array ADT/
β”œβ”€β”€ 02. Matrix/
β”œβ”€β”€ 03. Linked Lists/
β”œβ”€β”€ 04. Circular Linked Lists/
β”œβ”€β”€ 05. Doubly Linked Lists/
β”œβ”€β”€ 06. Circular Doubly Linked Lists/
β”œβ”€β”€ 07. Stack/
β”œβ”€β”€ 08. Circular Stack/
β”œβ”€β”€ 09. Queue/
β”œβ”€β”€ 10. Circular Queue/
β”œβ”€β”€ 11. Double Ended Queue/
β”œβ”€β”€ 12. Priority Queue/
β”œβ”€β”€ 13. Binary Tree/
β”œβ”€β”€ 14. Binary Search Tree/
β”œβ”€β”€ 15. AVL Tree/
β”œβ”€β”€ 16. Heap/
β”œβ”€β”€ 17. Sorting Algorithms/
β”œβ”€β”€ 18. Hashing/
β”œβ”€β”€ 19. Graphs/
β”œβ”€β”€ Complete Classes/
β”œβ”€β”€ Infix Postfix/
β”œβ”€β”€ LICENSE
β”œβ”€β”€ Parentheses Checking/
└── README.md

πŸ› οΈ Installation

To get started with this project, clone the repository:

git clone https://github.com/your-username/DSA-Programs.git
cd DSA-Programs

πŸ“– Usage

Each directory contains programs related to specific data structures or algorithms. Navigate to the respective directory to explore the implementations.

πŸ“š Data Structures Overview

Below is an overview of each data structure included in this repository, now illustrated using Mermaid diagrams for better understanding.

1. Array ADT

An array is a collection of elements identified by index or key. It is one of the simplest data structures where each data element can be accessed directly by its index.

Diagram:

graph LR
    0[10] --> 1[20]
    1 --> 2[30]
    2 --> 3[40]
    3 --> 4[50]
Loading

Learn More

2. Matrix

A matrix is a two-dimensional array of numbers arranged in rows and columns.

Diagram:

graph LR
    A[1] --> B[2] --> C[3]
    A2[4] --> B2[5]  --> C2[6]
    A3[7]  --> B3[8]  --> C3[9]
Loading

Learn More

3. Linked Lists

A linked list is a linear data structure where each element is a separate object, known as a node. Each node contains data and a reference (or link) to the next node in the sequence.

Diagram:

graph LR
    Head(Head) --> Node1((Data)) --> Node2((Data)) --> Node3((Data)) --> Null(null)
Loading

Learn More

4. Circular Linked Lists

A variation of a linked list where the last node points back to the first node, forming a circle.

Diagram:

graph LR
    Head(Head) --> Node1((Data)) --> Node2((Data)) --> Node3((Data)) --> Node4((Data)) --> Node1
Loading

Learn More

5. Doubly Linked Lists

A linked list where each node contains a reference to both the next and the previous node, allowing traversal in both directions.

Diagram:

graph LR
    Head(Head) --> Node1((Data)) <--> Node2((Data)) <--> Node3((Data)) --> Null(null)
Loading

Learn More

6. Circular Doubly Linked Lists

A combination of circular and doubly linked lists where the last node points back to the first node, and each node has references to both the next and previous nodes.

Diagram:

graph LR
    Head(Head) --> Node1((Data)) <--> Node2((Data)) <--> Node3((Data)) <--> Node4((Data)) <--> Node1
Loading

Learn More

7. Stack

A stack is a linear data structure that follows the Last In First Out (LIFO) principle. Elements are added (pushed) and removed (popped) from the same end, referred to as the top.

Diagram:

graph TD

Top("Top")
A["Element 3"]
B["Element 2"]
C["Element 1"]

Top --> A --> B --> C
Loading

Learn More

8. Circular Stack

A circular stack is a variation of the standard stack where the end of the stack wraps around to the beginning.

Diagram:

graph TD

Top("Top")
A["Element 3"]
B["Element 2"]
C["Element 1"]

Top --> A --> B --> C --> A
Loading

Learn More

9. Queue

A queue is a linear data structure that follows the First In First Out (FIFO) principle. Elements are added (enqueued) at the rear and removed (dequeued) from the front.

Diagram:

graph LR
    Front(Front) --> Data1((Data)) --> Data2((Data)) --> Data3((Data)) --> Rear(Rear)
Loading

Learn More

10. Circular Queue

A circular queue is a variation of the standard queue where the last position is connected back to the first position to make a circle.

Diagram:

graph LR
    Front(Front) --> Data1((Data)) --> Data2((Data)) --> Data3((Data)) --> Rear
    Rear(Rear) --> Data4((Data)) --> Data5((Data)) --> Front
Loading

Learn More

11. Double Ended Queue

A double-ended queue (deque) is a linear data structure that allows insertion and deletion of elements from both ends.

Diagram:

graph LR
    Front1(Front) --> Data1((Data)) --> Data2((Data)) --> Data3((Data)) --> Data4((Data)) --> Data5((Data))
    Data5 --> Rear1(Rear)
    Data5 --> Front2(Front)
    Rear2(Rear) --> Data1
Loading

Learn More

12. Priority Queue

A priority queue is a special type of queue in which each element is associated with a priority and elements are served based on their priority.

Diagram:

graph LR
    Front(Front) --> P1((P1)) --> P2((P2)) --> P3((P3)) --> Rear(Rear)
Loading

Learn More

13. Binary Tree

A binary tree is a tree data structure in which each node has at most two children, referred to as the left child and the right child.

Diagram:

graph TD
    A((Root)) --> B((2))
    A --> C((3))
    B --> D((4))
    B --> E((5))
    C --> F((6))
    C --> G((7))
Loading

Learn More

14. Binary Search Tree

A binary search tree (BST) is a binary tree in which each node has a value greater than all the values in its left subtree and less than all the values in its right subtree.

Diagram:

graph TD
    A((Root)) --> B((2))
    A --> C((5))
    B --> D((1))
    B --> E((3))
    C --> F((4))
    C --> G((7))
Loading

Learn More

15. AVL Tree

An AVL tree is a self-balancing binary search tree where the difference between heights of left and right subtrees cannot be more than one for all nodes.

Diagram:

graph TD
    A((Root)) --> B((2))
    A --> C((5))
    B --> D((1))
    B --> E((3))
Loading

Learn More

16. Heap

A heap is a special tree-based data structure that satisfies the heap property. In a max heap, for any given node I, the value of I is greater than or equal to the values of its children.

Diagram:

graph TD
    MaxHeap(Max Heap) --> B((9)) --> C((7))
    MaxHeap --> D((8)) --> E((6))
    MinHeap(Min Heap) --> F((2)) --> G((4))
    MinHeap --> H((3)) --> I((5))
Loading

Learn More

17. Sorting Algorithms

Sorting algorithms are methods of reorganizing a large number of items into a specific order, such as ascending or descending.

Learn More

18. Hashing

Hashing is a technique used to uniquely identify a specific object from a group of similar objects. A hash table is a data structure that implements an associative array abstract data type, a structure that can map keys to values.

Diagram:

graph TD
Table[Hash Table]
Table --> Entry1[0: Key1 -> Value1]
Table --> Entry2[1: Key2 -> Value2]
Table --> Entry3[2: Key3 -> Value3]
Table --> Entry4[3: Key4 -> Value4]
Table --> Entry5[4: Key5 -> Value5]
Loading

Learn More

19. Graphs

A graph is a collection of nodes, called vertices, and the connections between them, called edges. Graphs can be used to model many types of relations and processes in physical, biological, social, and information systems.

Diagram:

graph LR
    A((1)) <--> B((2))
    A((1)) <--> C((3))
    A((1)) <--> K((4))
    B((2)) <--> D((5))
    C((3)) <--> D((5))
    C((3)) <--> E((6))
    D((5)) <--> F((7))
    D((5)) <--> I((8))
    E((6)) <--> G((9))
    I((8)) <--> G((9))
    K((4)) <--> E((6))
    G((9)) <--> F((7))
Loading

Learn More

πŸ› οΈ Installation

To get started with this project, clone the repository:

git clone https://github.com/your-username/DSA-Programs.git
cd DSA-Programs

πŸ“– Usage

Each directory contains programs related to specific data structures or algorithms. Navigate to the respective directory to explore the implementations.

🀝 Contributing

Contributions are welcome! If you have any improvements or new implementations, feel free to open a pull request.

  • Fork the repository.
  • Create a new branch (git checkout -b feature-branch).
  • Commit your changes (git commit -m 'Add some feature').
  • Push to the branch (git push origin feature-branch).
  • Open a pull request.

πŸ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.

πŸ“§ Contact

If you have any questions or suggestions, feel free to reach out to us at [email protected]

About

DSA-Programs is a collection of Data Structures and Algorithms. It provides practical examples, detailed explanations, and ASCII diagrams to help you learn and master key DSA concepts like Arrays, Linked Lists, Stacks, Trees, Graphs, and sorting algorithms.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages