https://github.com/mohahmadraza/dsa-cpp
This is repo for those who are doing DSA in CPP. I added all the problems, which every university comes with when they arrange a DSA course for students.
https://github.com/mohahmadraza/dsa-cpp
algorithms algorithms-and-data-structures and arrays dictionaries dsa graphs hashing heap keys linkedlists lists pairs priority-queues queus recurrision stack trees values
Last synced: 4 months ago
JSON representation
This is repo for those who are doing DSA in CPP. I added all the problems, which every university comes with when they arrange a DSA course for students.
- Host: GitHub
- URL: https://github.com/mohahmadraza/dsa-cpp
- Owner: mohAhmadRaza
- Created: 2024-09-14T12:42:28.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-12-03T20:45:36.000Z (about 1 year ago)
- Last Synced: 2025-02-27T21:53:26.951Z (12 months ago)
- Topics: algorithms, algorithms-and-data-structures, and, arrays, dictionaries, dsa, graphs, hashing, heap, keys, linkedlists, lists, pairs, priority-queues, queus, recurrision, stack, trees, values
- Language: C++
- Homepage:
- Size: 88.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DSA in C++
This repository contains implementations of various **Data Structures** and **Algorithms** in C++. It is aimed at providing a structured approach to understanding and implementing core DSA concepts, useful for interview preparation and competitive programming.
## Table of Contents
---
1. [Introduction](#introduction)
2. [Data Structures](#data-structures)
3. [Algorithms](#algorithms)
4. [Installation & Setup](#installation--setup)
5. [How to Use](#how-to-use)
6. [Contributing](#contributing)
7. [License](#license)
---
## Introduction
This project is a collection of common **Data Structures** and **Algorithms** implemented in C++. Each data structure and algorithm is well-documented, with examples to help you understand how to use them.
It is designed for students, developers, and anyone looking to sharpen their problem-solving skills in **C++**.
---
## Data Structures
### 1. Linear Data Structures
- **Arrays**
- Operations: Insertion, Deletion, Searching
- **Linked List**
- Singly Linked List
- Doubly Linked List
- Circular Linked List
- **Stacks**
- Operations: Push, Pop, Peek
- **Queues**
- Circular Queue, Deque (Double-Ended Queue)
- Priority Queue
### 2. Non-Linear Data Structures
- **Trees**
- Binary Tree
- Binary Search Tree (BST)
- AVL Tree
- Heap (Min Heap, Max Heap)
- **Graphs**
- Adjacency Matrix and List Representation
- Breadth-First Search (BFS)
- Depth-First Search (DFS)
---
## Algorithms
### 1. Sorting Algorithms
- Bubble Sort
- Selection Sort
- Insertion Sort
- Merge Sort
- Quick Sort
- Heap Sort
### 2. Searching Algorithms
- Linear Search
- Binary Search
- Depth-First Search (DFS)
- Breadth-First Search (BFS)
---
## Installation & Setup
### Prerequisites
Make sure you have **Git** and a **C++ compiler** installed on your system.
1. Clone the repository using the following command:
```bash
git clone https://github.com/mohAhmadRaza/DSA-CPP.git
```
2. Navigate to the project directory:
```bash
cd DSA-CPP
```
3. Compile the C++ files using a C++ compiler (e.g., `g++`):
```bash
g++ filename.cpp -o output
```
4. Run the executable:
```bash
./output
```
---
## How to Use
Each folder inside this repository contains the following:
- **Code**: The actual C++ code implementing the data structure or algorithm.
- **Example**: An example or test case demonstrating how to use the code.
### Example
To run an example of a binary search algorithm:
1. Navigate to the binary search directory.
2. Compile and run the code:
```bash
g++ binary_search.cpp -o binary_search
./binary_search
```
---
## Contributing
Contributions are welcome! Feel free to open a pull request if you want to add new algorithms, optimize existing code, or fix any issues.
To contribute:
1. Fork this repository.
2. Create a new branch: `git checkout -b my-feature-branch`
3. Commit your changes: `git commit -m 'Add some feature'`
4. Push to the branch: `git push origin my-feature-branch`
5. Open a pull request.
---
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
---
## Acknowledgments
Thanks to all the resources, tutorials, and community support that made this project possible.
```