CppNuts | Codecademy | Leetcode |
The Cherno | johnmcfarlane/begin(C++) | HackerRank |
ChiliTomatoNoodle | ratansingh98/CPP-Learning | CodeChef |
Bo Qian | sahilbansal17/Get_Better_at_CP_in_2_Months | CodeForces |
CodeBlocks | Visualisze algorithms through animations | Learn CPP |
VS Code | CP Algorithms | CF Blog : Resources for cpp |
- Advanced Data Structures
- Array
- Backtracking
- Bit Manipulation
- Disjoint Set Union
- Divide And Conquer Algorithms
- Dynamic Programming
- Extra
- Graph Algorithms
- Graphs
- Greedy Algorithms
- HashMap
- HashTable
- Heap
- Linked List
- Mathematical Algorithms
- Miscellaneous
- Priority Queue
- Problem Statements and Solution
- Queue
- Recursion
- STL
- Searching Algorithms
- Sets
- Sorting Algorithms
- Stack
- String Algorithms
- Strings
- Template
- Tree
- Trie
Follow Steps | Get Started |
---|---|
![]() |
![]() |
![]() |
![]() |
Follow these steps | |
---|---|
New Algorithm | 'Please see if the algorithm is already present' |
What to include | "Your algorithm should be efficiently written with proper code / comments / time complexity / space complexity / link to gfg or any other documentation on top in code file" |
Where to include | please commit your algorithm in the correct folder or discuss[here](https://github.com/Lakhankumawat/LearnCPP/discussions/7) before committing to where to include` |
README | "Please check whether your directory has a README file, if there is then edit your algorithm name with a link, otherwise create a new one " how your README should look like |
Follow these steps | |
---|---|
New Problem Statement | 'Please see if the problem is present already? If it is do not commit your own ' |
What to include | "Your problem statement solution should be efficiently written with proper code / comments / time complexity / space complexity / link to problem statement in code file" |
Where to include | Most of the Problem Statements are inside hereplease commit your problem solution in the correct folder or discuss here before committing for where to include |
README | "Please check whether your directory has a README file, if there is then edit your algorithm name with a link, otherwise create a new one " how your README should look like |
Additional Context | "There are three levels of problem statement" 1-Level 1 `likewise 2-Level 2 & 3-Level 3, please include your problem statement with a solution in the right level you prefer |
Fond of designing README this section will be helpful to you
Follow these steps | |
---|---|
🆕 New README | 'Please see if there is no README in any folder if no? Then please design it, if yes? Then please edit it accordingly to your contribution and follow the guidelines ' |
🤔 What to include | "Your README should be efficiently and written / link to problem statement in README at the top" see exmaple |
✅ Must Contain | 1. and explain in brief about addition 2. An Image of addition i.e how it works 3. Mention the Pseudo Code 4. Time and Space Complexities 5. Advantages 6. Disadvantages |
🪧 Where to include | Inside the folder where programs are residing, discuss here before committing to where to include |
- If you find any errors or bugs then please report them by creating an issue.
- If you can provide a more efficient solution or implementation of the algorithm then make sure to contribute.
- If you want to implement an algorithm, data structure etc.., which is not yet there, then you can open up a PR regarding the same.
- Link to discussion forum
- Take a look at
contributing guidelines
if you're interested in helping! - Refer GitHub Flow.
LakhanKumawat ᵖ⁺ 💻 👀 📆 |
Nikita Sharma 💻 👀 🚧 |
SK MIRAJ 💻 👀 🚧 |
Gunjan 💻 👀 🚧 |
Siddhi Bhanushali 💻 👀 🚧 |
Pooja Mangal 👀 |
TRIDIB BAG 👀 |
Aditi 👀 |
Vilsi Jain 👀 |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | Array Operations | Solution |
2 | Antispiral Matrix | Solution |
3 | Counting Divisibl eSubstrings | Solution |
4 | First Negative in Every Window | Solution |
5 | Maximum Sum Subarray | Solution |
6 | Missing and Repeating Number | Solution |
7 | Peak in 1D Array | Solution |
8 | Prefix Sum | Solution |
9 | Reversing of Array | Solution |
10 | Sort an Array of 0's 1's and 2's | Solution |
11 | Best Time to Buy and Sell Stock | Solution |
12 | Symmetric Matrix | Solution |
13 | Trace and Normal | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | Hamiltonian Cycle | Solution |
2 | N-Queen | Solution |
3 | Rat in Maze | Solution |
4 | Subset Sum | Solution |
5 | The Knight’s Tour Problem | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | Bit Manipulation | Solution |
2 | Cout Set Bits | Solution |
3 | Swapping 2 Numbers | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | Disjoint Set Union | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | Rod Cutting | Solution |
2 | Equal Sum Partition Problem | Solution |
3 | Shortest Common Super-sequence | Solution |
4 | Trapping Rain Water Problem | Solution |
5 | Longest Common Subsequence Problem | Solution |
6 | Egg Dropping Puzzle | Solution |
7 | Climbing Stairs | Solution |
8 | Min Cost Climbing Stairs | Solution |
9 | Unique Paths | Solution |
10 | Unique Paths II | Solution |
11 | Minimum Falling Path Sum | Solution |
12 | Knapsack with Duplicate Items | Solution |
13 | Minimum number of deletions and insertions required | Solution |
14 | Coin Change | Solution |
15 | Kadane's Algorithm | Solution |
16 | 0-1 KnapSack | Solution |
17 | Traveling Sales Person | Solution |
18 | Subset Sum | Solution |
19 | Minimun Insertions form Palindrome | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | Turtle | Solution |
2 | Projectile | Solution |
3 | Design | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | Multistage Graph Shortest Path | Solution |
2 | Bellman Ford | Solution |
3 | Floyd Warshall | Solution |
4 | Dijsktra Single Source Shortest Path | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | Articulation Points | Solution |
2 | Graph Coloring | Solution |
3 | Check Bipartite | Solution |
4 | Add and delete edge of directed graph in an adjacency matrix | Solution |
5 | create and display an adjacency matrix | Solution |
6 | Adjacency List | Solution |
7 | Adjacency List Using Hashmap | Solution |
8 | Prims | Solution |
9 | Prims using Priority Queue | Solution |
10 | Kruskal | Solution |
11 | kruskal DSU | Solution |
12 | Ford Fulkerson | Solution |
13 | Breadth First Search | Solution |
14 | Depth First Search | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | Optimal Merge Pattern | Solution |
2 | Huffman Coding | Solution |
3 | Fractional KnapSack | Solution |
4 | Job Scheduling | Solution |
5 | Busyman Problem | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | HashMaps | Solution |
2 | Map | Solution |
3 | Multimap | Solution |
4 | UnorderedMap | Solution |
5 | UnorderedMaps CustomHashmaps OperatorOverloading | Solution |
6 | Set | Solution |
7 | Unordered Set | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | k largest | Solution |
2 | Min Heap | Solution |
3 | Max Heap | Solution |
4 | Heapify | Solution |
5 | Heap Sort | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | Singly Linked List | Solution |
2 | Removing Duplicates | Solution |
3 | Searching in a linked list | Solution |
4 | Reverse a Linked List | Solution |
5 | Middle element of the linked list | Solution |
6 | Palindrome linked list | Solution |
7 | Segregate Even Odd | Solution |
8 | Merge K Sorted LinkedList | Solution |
9 | LRU Cache | Solution |
10 | Circular Linked Lists | Explanation |
11 | Reverse a Doubly Linked List | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | SegmentedSieve | Solution |
2 | Armstrong number | Solution |
3 | Eulid Greatest Common Divisor | Solution |
4 | Prime Sum | Solution |
5 | Factorial Larger Numbers | Solution |
6 | Juggler Sequence | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | Exception Handling | Solution |
2 | Lambda Functions | Solution |
3 | Friend Class | Solution |
4 | Friend Function | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | Priority Queue | Solution |
2 | Priority Queue STL Comparator | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | Aggressive Cows | Solution |
2 | Pair with given sum in sorted doubly linked list | Solution |
3 | Maximum of all Subarrays of size k | Solution |
4 | Lowercase to Uppercase | Solution |
5 | Counting Frequencies | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | Queue Using Linked List | Solution |
2 | Queue Using Array | Solution |
3 | [Queue STL] | Solution |
4 | Circular Queue Using LinkedList | Solution |
5 | Reverse Queue | Solution |
6 | Circular Queue Using Array | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | Inversion Count | Solution |
2 | Replace PI | Solution |
3 | Tower of Hanoi | Solution |
4 | Calculating GCD and LCM by Recursion | Solution |
5 | Taylor series by Horner's rule | Solution |
6 | Types of Recursion | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | Pairs STL | Solution |
2 | Lists-Operation | Solution |
3 | Lists | Solution |
4 | Multiset | Solution |
5 | Sets | Solution |
6 | Vector | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | Linear Search | Solution |
2 | Binary Search | Solution |
3 | Search Element in a Rotated Sorted Array | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | Cartesian Product of two Set | Solution |
2 | Union of two sets | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | Bubble Sort | Solution |
2 | Insertion Sort | Solution |
3 | Quick Sort | Solution |
4 | Merge Sort | Solution |
5 | Counting Sort | Solution |
6 | Bucket Sort | Solution |
7 | DNF Sort | Solution |
8 | Selection Sort | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | Infix to postfix conversion | Solution |
2 | Redundant Parenthesis | Solution |
3 | Stack ADT using Linked List | Solution |
4 | Converting decimal number to binary | Solution |
5 | Stacks Without STL | Solution |
6 | Stacks STL | Solution |
7 | Next Greater Element | Solution |
8 | Bracket Balancing Using Stack | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | KMP | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | Strings | Solution |
2 | String Toknizer | Solution |
3 | String Sorting | Solution |
4 | String Reverse | Solution |
5 | String Comparison | Solution |
6 | Longest Word In Sentence | Solution |
7 | String Palindrome | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | Class Template | Solution |
2 | Function Template | Solution |
# | Problem Statement & Explanation | Solution |
---|---|---|
1 | Ceil Value in BST | Solution |
2 | Check Valid BST | Solution |
3 | Floor Value in BST | Solution |
4 | BST | Solution |
5 | AVL | Solution |
6 | Array to Bst | Solution |
7 | Construct BST From Preorder Travsersal | Solution |
8 | Height of the binary tree | Solution |
9 | Largest Bst in a Binary Tree | Solution |
10 | Diameter of Binary Tree | Solution |
11 | Number of leaf nodes in binary tree | Solution |
12 | FenwickTree | Solution |
13 | Iterative Preorder and Postorder Traversal of Generic Tree | Solution |
14 | Level order traversal in a Genric Tree | Solution |
15 | Mirror of a Genric Tree | Solution |
16 | Diameter of a Genric Tree | Solution |
17 | Minimum distance between two nodes in a Genric Tree | Solution |
18 | Construct and Display Genric Tree | Solution |
19 | Diagonal Traversal | Solution |
20 | Morris Traversal | Solution |
21 | Preorder Traversal | Solution |
22 | Postorder Traversal | Solution |
23 | Inorder Traversal | Solution |
24 | Levelorder Traversal | Solution |
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind are welcome!
Developed with ❤️ in India 🇮🇳