This repository contains various data structure implementations and algorithms in C++.
Data structures are fundamental concepts in computer science that allow efficient organization, storage, and manipulation of data. This repository aims to provide clear implementations of common data structures using C++.
Data structures can be broadly categorized into two main types:
-
Linear Data Structures: Store data in a sequential order
- Arrays
- Linked Lists
- Stacks
- Queues
-
Non-Linear Data Structures: Store data in a hierarchical or networked order
- Trees
- Graphs
- Heaps
- Hash Tables
This repository includes implementations of the following data structures:
A collection of data elements of the same type, stored in contiguous memory locations. Arrays can be fixed-size or dynamic:
- Fixed-size arrays: Have a predetermined length that cannot be changed after creation.
- Dynamic arrays: Can grow or shrink in size as needed, automatically reallocating memory.
A dynamic collection of data elements (nodes) linked together by pointers.
A linear data structure following the LIFO (Last In First Out) principle.
A linear data structure following the FIFO (First In First Out) principle.
A special type of binary tree that maintains a sorted order of elements.
A non-linear data structure consisting of vertices and edges.
To clone this repository, run the following command in your terminal:
git clone https://github.com/A-A7med-i/Data_Structure.git
Each data structure is implemented in its own file. To use a specific data structure, include the corresponding header file in your C++ program.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.