Welcome to the Data Structures and Algorithms in C++ repository! This project aims to provide a comprehensive guide to mastering data structures and algorithms, focusing on practical implementations using C++ and the GNU Compiler Collection (g++).
- Learn fundamental and advanced data structures and algorithms.
- Understand the theory behind various techniques.
- Implement these concepts efficiently in C++.
- Practice solving problems to solidify understanding.
Each topic is organized into its own folder with the following structure:
Topic Name/
├── topicName.txt # Explanation of the topic and key concepts
├── Code/ # C++ implementations
├── example.cpp # Example code for the topic
└── ...
- Syntax of C++
- Control Structures
- Functions
- Basics of Object-Oriented Programming (OOP)
- Pseudocode
- Arrays
- Linked Lists
- Stacks
- Queues
- Hash Tables
- Big O Notation
- Big Theta (Θ) Notation
- Big Omega (Ω) Notation
- Time and Space Complexity Analysis
- Bubble Sort
- Insertion Sort
- Selection Sort
- Merge Sort
- Quick Sort
- Heap Sort
- Linear Search
- Binary Search
- Trees (Binary Trees, Binary Search Trees, AVL Trees, B-Trees)
- Graphs (Directed and Undirected)
- Graph Traversals (BFS, DFS)
- Shortest Path Algorithms (Dijkstra, Bellman-Ford)
- Minimum Spanning Trees (Prim, Kruskal)
- Brute Force
- Greedy Algorithms
- Divide and Conquer
- Dynamic Programming
- Backtracking
- Recursion
- Two Pointer Technique
- Sliding Window Technique
- Compiler: g++ (GNU Compiler Collection)
- Operating System: Linux
If g++ is not installed on your Linux system, you can install it using the following command:
sudo apt update && sudo apt install g++
- Navigate to the folder containing the
.cpp
file. - Compile the program using g++:
g++ example.cpp -o example.exe
- Run the compiled program:
./example.exe
We welcome contributions! If you want to improve the code or add new topics, please:
- Fork the repository.
- Create a new branch (
git checkout -b feature-name
). - Commit your changes (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature-name
). - Create a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.
Special thanks to the creators of roadmap.sh for providing a detailed guide on this topic.