AbdoJoker99/Cpp
A comprehensive collection of basic data structures, mathematical utilities, and sorting/searching algorithms implemented in C++. Ideal for beginners, students, and interview preparation.
๐ C++ Data Structures and Algorithms Library
A comprehensive collection of basic data structures, mathematical utilities, and sorting/searching algorithms implemented in C++. Ideal for beginners, students, and interview preparation.
๐ Contents
โ Data Structures
- Arrays
- Stack (Array-based & Linked List-based)
- Queue
- Linear Queue
- Circular Queue
- Double-ended Queue
- Singly Linked List
- Doubly Linked List
- Hash Table (basic implementation)
- Binary Search Tree (BST)
๐ข Mathematical Programs
- Area & Perimeter of:
- Triangle
- Rectangle
- Square
- Parallelogram
- Trapezoid
- Factorial (Iterative & Recursive)
- Fibonacci Sequence
- GCD (Greatest Common Divisor)
- LCM (Least Common Multiple)
โ๏ธ Algorithms
Sorting Algorithms
- Quick Sort
- Merge Sort
- Insertion Sort
- Bubble Sort
Searching Algorithms
- Linear Search
- Binary Search
๐งฐ Other Features
- Built-in C++ Standard Library Functions (
<algorithm>,<cmath>,<string>, etc.) - File Handling (read/write to text files)
๐ Getting Started
๐ง Requirements
- C++17 or above
- C++ compiler (e.g.
g++,clang++,MSVC)
๐ฅ Installation
Clone the repository:
git clone https://github.com/AbdoJoker99/Cpp๐ ๏ธ Installing MSYS2 and GCC (Windows)
-
Download MSYS2 from https://www.msys2.org
-
Install and open the MSYS2 terminal
-
Update the package database and core system packages:
pacman -Syu
๐ Restart the terminal when prompted, then continue:
pacman -Su
-
Install GCC and Build Tools:
pacman -S mingw-w64-ucrt-x86_64-gcc
-
[Recommended Fix] GPG Key Issue (if package installation fails):
If you encounter an error related to invalid or missing GPG keys when installing packages, run:
pacman -S gnupg
Then initialize the keyring with:
pacman-key --init pacman-key --populate msys2
-
Use the MSYS2 MinGW UCRT 64-bit terminal to compile your code:
g++ -std=c++17 -o program your_code.cpp ./program
๐ฅ Contributors
| Name | GitHub |
|---|---|
| Abdo | @AbdoJoker99 |
๐ ๏ธ Tools
Web Extensions
- CF Analytics โ Codeforces contest data analytics
- CF-Predictor โ Predict problem difficulty on Codeforces
- Carrot โ Competitive programming helper
- WebChatGPT: ChatGPT with internet access โ Extend ChatGPT with live web data
VS Code Extensions
- Code Runner โ Run code snippets quickly
- Competitive Programming Helper (CPH) โ Manage contests and solutions
๐ Resources
๐งช Practice Platforms
Sharpen your skills on these coding platforms:
- LeetCode โ Popular for interviews and competitive prep
- Codeforces โ Competitive programming contests
- HackerRank โ C++ and DSA practice tracks
๐ License
This project is licensed under the Apache License.
See the LICENSE file for more information.