Welcome to the C++ Algorithms and Data Structures repository! This repo contains a collection of essential algorithms and data structure implementations in C++. It is designed to be a resource for anyone learning C++ or preparing for coding interviews.
This repository contains implementations of various algorithms and data structures in C++. It includes both fundamental algorithms (sorting, searching, etc.) and advanced topics like graph algorithms, dynamic programming, and more.
- C++ Language: Code is written in C++.
- Clean and Modular Code: Each algorithm is separated for clarity.
- Algorithms and Data Structures: Covers a wide range of topics from basic to advanced.
- Documentation: Each algorithm includes comments explaining its functionality and time complexity.
-
Clone the repository:
git clone https://github.com/your-username/Cpp-Algorithms.git cd Cpp-Algorithms
-
Compile a specific file:
g++ filename.cpp -o output ./output
- Algorithms/: Core algorithm implementations.
Sorting/
: Various sorting algorithms like quicksort, mergesort, etc.Searching/
: Searching algorithms like binary search, linear search, etc.
- DataStructures/: Common data structures in C++.
LinkedList/
Stack/
Queue/
Tree/
Graph/
- DynamicProgramming/: DP problems and solutions.
- Others/: Miscellaneous algorithms.
Contributions are welcome! If you’d like to add new algorithms or improve existing ones:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.