This repository contain the C++ program from basic to advance.
- Sum Of Elements
- Reverse Array
- Remove Duplicate Elements
- Left Rotate By One
- Trapping Rain Water
- Max Number In Array
- Left Rotate Array By d
- Right Rotation By d
- Best Time to Buy and Sell Stock
- Is Sorted
- Count Frequency Of All Elements
- Maximum Consecutive 1's in a Binary Array
- Moving All Zeros To The End
- Linear search
- Leaders In Array
- Largest Element
- Insert Element
- Cyclically rotate an array by one
- N-Queen Problem
- Palindromic Partitions
- Print all permutations of a given string
- Word Break Problem
- Rat In A Maze
- Construction of a Binary Tree from Inorder and Preorder traversal
- Height of Tree
- Inorder Traversal
- LCA
- Postorder_Traversal
- Preorder Build And Print
- Print Node At Distance K
- Tree Traversal In Spiral Form
- preorder_traversal
- Calculate square of a number
- Clear Bit
- Clear Range Of Bit
- Copy set bits in a range
- Count number of bits to be flipped to convert A to B
- Decimal_To_Binary
- Find position of the only set bit
- Find the two non-repeating elements in an array of repeating elements
- Find_Unique_Number
- Inserting m into n such that m starts at bit j and ends at bit i
- Modify a bit at a given position
- Program to find whether a no is power of two
- Set Bit
- Clear Range I to J
- Fast Exponential
- Array Jump Problem
- Box Stacking
- Coin Change Problem
- Count Tree
- Fibonacci
- Frog's Min Cost
- Knapsack Problem
- Ladders Problem
- Longest Common Subsequence
- Longest Increasing Sequence
- Max Non Adjacent Sum
- Rod Cutting Problem
- Selling Wines
- Subsequence Count
- Minimum Spanning Tree
- Pairing Problem
- Shortest Cycle in an Undirected Unweighted Graph
- Snake_And_ladder
- Traversal
- Bellman Ford Algorithm.cpp
- Bipartite Graph Check.cpp
- Check If Unidirected Graph Is A Tree Or Not
- Connected Components Count
- Cycle Detectin Undirected Graph Using DFS
- Cycle Detection Directed Graph Using DFS
- Cycle Detection In Undirected Graph Using DSU
- Dijkstra's Algorithm
- Flood Fill Algorithm
- Path Compression Optimisation
- Single_Source_Shortest_Path
- Topological Sort Using BFS
- Topological Sort Using DFS
- Union By Rank Optimisation
- Go to given file where you could see the problem.
- See the constraints, input and output formats of the problem and write your function accordingly. (Would help you to write a clean code.)
- Run your solution on local machines and check for some test cases.
- Click on create new file in that folder only.
- Copy your code there and with Solution_By_A.cpp [ A would be Your Name - Like Solution_By_Mashiyat.cpp ]
- After copying, click on propose new file.[ At the Bottom]
- Then You'd be redirected to new page, where you need to click on create pull request.
- Add your comments or anything you want to tell abour you solution.
- Then Click on create pull request and write one line description in box above the button.
- Your solution is pushed in the repository.
- If you want to add a new problem, then add a readMe.md together to explain the problem and choose appropriate sections such as Dynamaic Programming, Greedy Algorithms, Data Structure, etc to push your readMe and solution file. For example - If you are adding Tim Sort solution, go to Array or Vector folder inside Data Structure Section and then create a folder Tim Sort and then add both of your files there.
- Star the repo - Fork_CPP
- Follow me on Github - Mashiyat Hussain
Pandz18 |
mashiyathussain2 |