Skip to content

Learn Cpp from Beginner to Advanced ✅ Practice 🎯 Code 💻 Repeat 🔁 One step solution for c++ beginners and cp enthusiasts.

License

Notifications You must be signed in to change notification settings

Lakhankumawat/LearnCPP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Repository files navigation

GitHub repo size

LearnCPP

 forks  forks  forks  forks  forks

All Contributors

What's Inside 🗃

Read the following steps before contributing.

Follow Steps Get Started
Alt text Alt text
Alt text Alt text

Algorithms

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 /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

Problem Statement

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 insidehereplease commit your problem solution in the correct folder or discussherebefore 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

To add programs usingSTL,follow the same approach asAlgorithms

Readme

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 addition2. An Image of addition i.e how it works3. Mention the Pseudo Code4. Time and Space Complexities5. Advantages6. Disadvantages
🪧 Where to include Inside the folder where programs are residing, discussherebefore committing to where to include

Why contribute?

  • 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

Want to contribute?


🌟 Stargazers Over Time 🌟

Stargazers over time

Project Maintainers ❤️



LakhanKumawat ᵖ⁺

💻👀📆

Nikita Sharma

💻👀 🚧

SK MIRAJ

💻 👀 🚧

Gunjan

💻 👀 🚧

Siddhi Bhanushali

💻 👀 🚧

Pooja Mangal

👀

TRIDIB BAG

👀

Aditi

👀

Vilsi Jain

👀


  • Array

# 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
  • Backtracking

# 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
  • Bit Manipulation

# Problem Statement & Explanation Solution
1 Bit Manipulation Solution
2 Cout Set Bits Solution
3 Swapping 2 Numbers Solution
  • Disjoint Set Union

# Problem Statement & Explanation Solution
1 Disjoint Set Union Solution
  • Dynamic Programming

# 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
  • Extra

# Problem Statement & Explanation Solution
1 Turtle Solution
2 Projectile Solution
3 Design Solution
  • Graph Algorithms

# 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
  • Graphs

# 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
  • Greedy Algorithms

# 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
  • HashMap

# 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
  • Heap

# Problem Statement & Explanation Solution
1 k largest Solution
2 Min Heap Solution
3 Max Heap Solution
4 Heapify Solution
5 Heap Sort Solution
  • Linked List

# 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
  • Mathematical Algorithms

# 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
  • Miscellaneous

# Problem Statement & Explanation Solution
1 Exception Handling Solution
2 Lambda Functions Solution
3 Friend Class Solution
4 Friend Function Solution
  • Priority Queue

# Problem Statement & Explanation Solution
1 Priority Queue Solution
2 Priority Queue STL Comparator Solution
  • Problem Statements and 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
  • Queue

# 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
  • Recursion

# 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
  • STL

# Problem Statement & Explanation Solution
1 Pairs STL Solution
2 Lists-Operation Solution
3 Lists Solution
4 Multiset Solution
5 Sets Solution
6 Vector Solution
  • Searching Algorithms

# Problem Statement & Explanation Solution
1 Linear Search Solution
2 Binary Search Solution
3 Search Element in a Rotated Sorted Array Solution
  • Sets

# Problem Statement & Explanation Solution
1 Cartesian Product of two Set Solution
2 Union of two sets Solution
  • Sorting Algorithms

# 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
  • Stack

# 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
  • String Algorithms

# Problem Statement & Explanation Solution
1 KMP Solution
  • Strings

# 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
  • Template

# Problem Statement & Explanation Solution
1 Class Template Solution
2 Function Template Solution
  • Tree

# 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

Contributors ✨

Thanks goes to these wonderful people (emoji key):


LakhanKumawat ᵖ⁺

💻👀📆

Chetas Shree Madhusudhan

💻

Nikita Sharma

💻👀

Ujjwal Bansal

💻

Supratim2000

💻

Puneet Kaur

💻

StarEditorBoy

💻

Parthib Sarkar

💻

rutujaingole

💻

Suhotra Dey

💻

SATYAM KUMAR

💻💡

Aastik Sharma

💻

Shivani Thorve

💻

Ikko Ashimine

👀💻

All Contributors

💻

gaurangSaraswat-07

💻

Anurag Kumar Singh

💻

Divyansh Singh

💻

VaishnaviMandloi

💻

Aditya Kumar Singh

💻

aditim26

💻

IZHAR AHMAD

💻

Priyanshu Saxena

💻

Mrudula-Kulkarni

💻

Sahil Horo

💻

ShruthiKartik

💻

Aneesh Tripathi

💻

Md Nazish Arman

💻

SHUBHAM LAKHERA

💻

aparnamittal

💻

Rahul Sharma

💻

Jayanth MKV

💻

Sidharth Sarangi

💻

Rahul kumar

💻

Purvak Baliyan

💻

Mohammad Ruman

💻

Vinaya Sree Modem

💻

Maithili Kharabe

💻

Shashank Venkat

💻

Janhavi Kale

💻

TRIDIB BAG

💻

Sebin Francis

💻

Kalash Singhal

💻

Bhavneet Singh

💻

Jyoti Singh

💻

Aisha

💻

Bhumika Tewary

💻

arzitmahajan

💻

PeritusDeveloper

💻

Prashant Raj

💻

Ritika Garg

💻

Shweta Bhagat

💻

Abhilipsa Sahoo

💻

Akshat Agarwal

💻

Uhini Mukherjee

💻

Pragati Verma

💻

Dewanshi Paul

💻

Arun G Nayak

💻

Sukriti

💻

Sarthak S Kumar

📖

Deeptarshi Biswas

💻

PRANSHU JAIN

💻

Hend Ahmed

💻

Shatakshi-Choudhary

💻

Aly Eyad

💻

Michael Ehab

💻

Shraddha

💻

Sanya Gera

💻

Utkarsh Saxena

💻

Ayushi Bisht

💻

Mirette Amin

💻

Lakshay Narula

💻

Supriya Kumari

💻

Gaurav Patel

💻

NISHKARSH SAXENA

💻

Purva-Gharat

💻

Yasmeen ElKararty

💻

Chahat Mittal

💻

riya singh

💻

arushi_garg

💻

Shiwangi Kumari

💻

Ayush Rudani

💻

mugdhaPandey

💻

Rahul Barnwal

💻

This project follows theall-contributorsspecification. Contributions of any kind are welcome!

Happy Coding!!




© LearnCPP 2022
All Rights Reserved

Developed with ❤️ in India 🇮🇳