Welcome to my repository! Here, you'll find a comprehensive collection of C++ solutions for a wide range of algorithms and problems from various competitive programming platforms like LeetCode, Codeforces, HackerRank, and more. The codes here are solutions I've used and refined through multiple contests, practice sessions, and challenges.
This repository contains C++ implementations of solutions for problems I've encountered on competitive programming platforms. The solutions are optimized for performance and adhere to the constraints and requirements of respective problem statements.
If you're preparing for contests, coding interviews, or simply exploring algorithmic problem-solving, you'll find these implementations helpful as references and study material.
Some algorithms you'll find here include, but are not limited to:
- Binary Search
- Depth-First Search (DFS) & Breadth-First Search (BFS)
- Dynamic Programming (Knapsack, Longest Common Subsequence, etc.)
- Graph algorithms (Dijkstra's, Kruskal's, etc.)
- Greedy Algorithms
- Sorting Algorithms (QuickSort, MergeSort, etc.)
- String Matching (KMP, Rabin-Karp)
- ...and many more!
Feel free to clone this repository and use it for learning and reference purposes:
git clone https://github.com/XxAlonexX/CP-Algorithms.git
cd CP-Algorithms
Each solution is self-contained and can be compiled with a standard C++ compiler. For example, to compile and run a file named example.cpp
:
g++ example.cpp -o example
./example
If you find any issues or want to add new solutions, feel free to fork the repository, make changes, and submit a pull request. Contributions are always welcome!
Happy coding and best of luck in your competitive programming journey! 🚀