An open API service indexing awesome lists of open source software.

https://github.com/tusharpamnani/dsa

A comprehensive resource for learning DSA. Originally crafted for personal revision, it has evolved into an open library for enthusiasts, students, and developers alike.
https://github.com/tusharpamnani/dsa

algorithms data-structures

Last synced: 12 months ago
JSON representation

A comprehensive resource for learning DSA. Originally crafted for personal revision, it has evolved into an open library for enthusiasts, students, and developers alike.

Awesome Lists containing this project

README

          

# Data Structures and Algorithms Repository

Welcome to the Data Structures and Algorithms repository! This repository contains C/C++ implementations of fundamental data structures and algorithms, designed to help you learn and understand core concepts in computer science.

## Table of Contents

- [Graphs](#graphs)
- [Linked Lists](#linked-lists)
- [Sorting Algorithms](#sorting-algorithms)
- [Searching Algorithms](#searching-algorithms)
- [Stack](#stack)
- [Queue](#queue)

## Graphs

The `graphs` directory includes C/C++ implementations of essential graph algorithms and representations. Graphs are versatile data structures used to model relationships between entities.

### Features

1. **Depth-First Search (DFS):** Traverse through the graph using DFS. ([Code in C++](./Graphs/DFS.cpp)) ([Code in C](./Graphs/DFS.c))
2. **Breadth-First Search (BFS):** Explore the graph in breadth-first order. ([Code in C++](./Graphs/BFS.cpp)) ([Code in C](./Graphs/BFS.c))
3. **Dijkstra's Shortest Path:** Find the shortest path in a weighted graph. ([Code in C++](./Graphs/DijkstrasAlgorithm.cpp)) ([Code in C](./Graphs/DijkstrasAlgorithm.c))
4. **Prim's Minimum Spanning Tree:** Construct the minimum spanning tree using Prim's algorithm. ([Code in C++](./Graphs/PrimsAlgorithm.cpp)) ([Code in C](./Graphs/Prim.c))
5. **Kruskal's Minimum Spanning Tree:** Build the minimum spanning tree using Kruskal's algorithm. ([Code in C++](./Graphs/KruskalsAlgorithm.cpp)) ([Code in C](./Graphs/Kruskal.c))

## Linked Lists

The `linked_lists` directory contains C/C++ implementations of various linked list types, offering insights into their structure and operations.

### Features

1. **Singly Linked List:** Basic singly linked list operations. ([Code in C](./Linked-Llists/SinglyLinkedList.c))
2. **Doubly Linked List:** Operations on doubly linked lists, including forward and backward traversal. ([Code in C](./Linked%20Lists/DoublyLinkedLists.c))
3. **Circular Linked List:** Circular representation and operations on linked lists. ([Code in C](./Linked_-Lists/CircularLinkedList.c))

## Sorting Algorithms

The `sorting_algorithms` directory presents C/C++ implementations of well-known sorting algorithms.

### Sorting Algorithms Implemented

1. **Quick Sort:** Efficient in-place sorting. ([Code in C++](./Sorting/2.QuickSort.cpp))
2. **Merge Sort:** Divide-and-conquer approach for stable sorting. ([Code in C++](./Sorting/1.MergeSort.cpp))
3. **Heap Sort:** Efficient comparison-based sorting. ([Code](./sorting_algorithms/HeapSort.cpp))
4. **Insertion Sort:** Simple sorting algorithm with linear time for small data sets. ([Code](./sorting_algorithms/InsertionSort.cpp))
5. **Counting Sort:** Non-comparative sorting for integers. ([Code](./sorting_algorithms/CountingSort.cpp))
6. **Shell Sort:** Variance of insertion sort with better performance. ([Code](./sorting_algorithms/ShellSort.cpp))

## Searching Algorithms

The `searching_algorithms` directory showcases C/C++ implementations of common searching algorithms.

### Searching Algorithms Implemented

1. **Binary Search:** Efficient search in sorted arrays. ([Code in C++](./Searching/1.BinarySearch.cpp))
2. **Linear Search:** Basic linear search algorithm. ([Code](./Searching/LinearSearch.cpp))

## Stack

The `stack` directory provides C++ implementations of the stack data structure.

### Features

1. **Push and Pop operations:** Fundamental stack operations. ([Code](./stack/Stack.cpp))
2. **Stack Implementation using Arrays:** Basic array-based stack. ([Code](./stack/ArrayStack.cpp))
3. **Stack Implementation using Linked List:** Stack implemented using a linked list. ([Code](./stack/LinkedListStack.cpp))

## Queue

The `queue` directory contains C++ implementations of the queue data structure, including different variations.

### Features

1. **Enqueue and Dequeue operations:** Basic queue operations. ([Code](./queue/Queue.cpp))
2. **Queue Implementation using Arrays:** Simple array-based queue. ([Code](./queue/ArrayQueue.cpp))
3. **Queue Implementation using Linked List:** Queue implemented using a linked list. ([Code](./queue/LinkedListQueue.cpp))
4. **Circular Queue:** Queue with a circular structure. ([Code](./queue/CircularQueue.cpp))
5. **Double Ended Queue (Deque):** Queue that allows insertion and deletion at both ends. ([Code](./queue/Deque.cpp))
6. **Priority Queue:** Queue with elements assigned priority levels. ([Code](./queue/PriorityQueue.cpp))

## Contribution

Contributions are welcome! If you have suggestions, improvements, or additional implementations, feel free to open an issue or submit a pull request.

Happy Coding!