Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
shhossain authored Nov 26, 2023
2 parents 110ffc8 + 4861e52 commit 83eb4c0
Show file tree
Hide file tree
Showing 13 changed files with 1,143 additions and 103 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -1311,6 +1311,15 @@
"content",
"code"
]
},
{
"login": "jiangfz1997",
"name": "Fangzhou_Jiang",
"avatar_url": "https://avatars.githubusercontent.com/u/63608649?v=4",
"profile": "https://github.com/jiangfz1997",
"contributions": [
"content"
]
}
],
"contributorsPerLine": 6,
Expand Down
19 changes: 10 additions & 9 deletions Algorithms/Backtracking/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ Backtracking is an algorithmic-technique for solving problems recursively by try


## Some Popular Backtracking Algorithms

* [Sudoku](Sudoku/readme.md)
* [M Coloring](M%20Colouring%20Problem/readme.md)
* [Sum of Subset](Subset%20Sum/README.md)
* [Knight's Tour](The%20Knight’s%20tour%20problem/README.md)
* [Word Boggle](Word%20Boggle/README.md)
* [Rat in a Maze](Rat%20in%20a%20Maze/README.md)
* [The Knight’s tour problem](The%20Knight’s%20tour%20problem/README.md)
* [N Queen Problem](N%20Queen%20Problem/README.md)
* [M Coloring Problem](m%20colouring/README.md)
* [Sudoku](Sudoku/readme.md)
* [Cryptarithmetic Puzzles](Cryptarithmetic%20Puzzles/README.md)
* [Subset Sum Algorithm](Subset%20Sum/README.md)
* [Tug of War](Tug%20of%20War/README.md)
* [Word Boggle](Word%20Boggle/README.md)
* [Permutation of a Given String](Permutation%20Of%20a%20Given%20String/README.md)
* [Generating IP address](Generate%20IP%20Adresses/README.md)
* [All Possible Paths](Find%20All%20Possible%20Path/README.md)
* [Generate IP Addresses](Generate%20IP%20Adresses/README.md)
* [Remove Invalid Parentheses](Remove%20Invalid%20Parentheses/README.md)
* [Longest Possible Route in a Matrix with Hurdles](Longest%20Possible%20Route%20in%20a%20Matrix%20with%20Hurdles/README.md)
* [Permutation of a Given String](Permutation%20Of%20a%20Given%20String/README.md)
* [Magnet Puzzle](Magnet%20Puzzle/README.md)
* [Tug of War](Tug%20of%20War/README.md)
2 changes: 1 addition & 1 deletion Algorithms/Backtracking/Word Boggle/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Largest number in K swaps
## Word Boggle

Given a dictionary of distinct words and an M x N board where every cell has one character. Find all possible words from the dictionary that can be formed by a sequence of adjacent characters on the board. We can move to any of 8 adjacent characters

Expand Down
10 changes: 5 additions & 5 deletions Algorithms/Branch and Bound/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ The general idea of Branch and Bound algorithm is a BFS-like search for the opti

- 0/1 knapsack problem
- Job Assignment Problem
- Travelling Salesman Problem
- Nearest Neighbour search
- Traveling Salesman Problem
- Nearest Neighbor search
- N-Queens Problem


## Popular Dynamic Programming Algorithms
* [0/1 knapsack problem](Knapsack%20Problem/README.md)
* [Job Assignment Problem](Job%20Assignment%20Problem/README.md)
* [Travelling Salesman Problem](Not-Added)
* [Nearest Neighbour search](Not-Added)
* [N-Queens](Not-Added)
* [Traveling Salesman Problem](../Traveling%20Salesman%20Problem/readme.md)
* Nearest Neighbor search
* [N-Queens](../Backtracking/N%20Queen%20Problem/README.md)
15 changes: 11 additions & 4 deletions Algorithms/Dynamic Programming/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,21 @@ Dynamic Programming algorithm is designed using the following four steps −

### Popular Dynamic Programming Algorithms
* [Fibonacci Sequence](Fibonacci%20Sequence/README.md)
* [Nth Fibonacci](Nth%20Fibonnaci/README.md)
* [Nth Catalan Number/Sequence](Nth%20Catalan%20Number/README.md)
* [Longest Common Subsequence](Longest%20Common%20Subsequence/README.md)
* [Longest Increasing Subsequence](Longest%20Increasing%20Subsequence/README.md)
* [Longest Common Substring](Longest%20Common%20Substring/readme.md)
* [Longest Palindromic Substring](Longest%20Palindromic%20Substring/README.md)
* [Knapsack Problem](Knapsack%20Problem/README.md)
* [Edit Distance](Edit%20Distance/README.md)
* [Coin Change](Coin%20Change/README.md)
* Coin Change
* [Matrix Chain Multiplication](Matrix%20Chain%20Multiplication/README.md)
* [Balanced Tree Count](Count%20Balanced%20Binary%20Trees%20of%20Height%20h/readme.md)
* [Counting Hops](Count%20Number%20Of%20Hops/README.md)
* [Floyd Warshall Algorithm](Floyd%20Warshall%20Algorithm/readme.md)
* [Subset Sum Problem](Subset%20Sum%20Problem/readme.md)
* [Gold Mine Problem](Gold%20Mine%20Problem/README.md)
* [Least Common Multiple (LCM)](LCM/LCM.md)
* [Painting Fence Algorithm](Painting%20Fence%20Algorithm/readme.md)
* [Coin Change](Coin%20Change/readme.md)
* [Longest Common Substring](Longest%20Common%20Substring/readme.md)
* [Staircase](Staircase/README.md)
* [Subset Sum Problem](Subset%20Sum%20Problem/readme.md)
24 changes: 14 additions & 10 deletions Algorithms/Graphs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ A Graph is a non-linear data structure consisting of vertices and edges. The ver


## Components of a Graph
- **[Vertices](#verticies)** - A vertex is a node of the graph. It can be denoted by any symbol such as V, U, X, Y, etc. A vertex may also be referred to as a node or a point.
- **[Vertices](#vertices)** - A vertex is a node of the graph. It can be denoted by any symbol such as V, U, X, Y, etc. A vertex may also be referred to as a node or a point.
- **[Edges](#edges)** - An edge is a connection between two nodes. It can be denoted by any symbol such as E, F, G, H, etc. An edge may also be referred to as a link or a line.
- **[Weight](#weight)** - A weight is a value associated with an edge. It can be denoted by any symbol such as W, X, Y, Z, etc. A weight may also be referred to as a cost.

Expand Down Expand Up @@ -102,18 +102,22 @@ Pic Will be added
## Graph Topics
1. [Graph Traversal](Traversal%20Algorithms/readme.md)
- [Breadth First Search](Traversal%20Algorithms/BreadthFirstSearch/readme.md)
- [Depth First Search](Traversal%20Algorithms/DepthFirstSearch/readme.md)]
2. [Cycle Detection](Cycle%20Detection/readme.md)
- [Undirected Graph](Cycle%20Detection/Undirected%20Graph/readme.md)
- [A* Search](Traversal%20Algorithms/AstarSearch/readme.md)
- [Depth First Search](Traversal%20Algorithms/DepthFirstSearch/readme.md)
2. [Topological Sorts](Topological%20Sort/readme.md)
3. [Cycle Detection](Cycle%20Detection/readme.md)
- Undirected Graph
- [DFS](Cycle%20Detection/Undirected%20Graph/DFS/readme.md)
- [BFS](Cycle%20Detection/Undirected%20Graph/BFS/readme.md)
- [Directed Graph](Cycle%20Detection/Directed%20Graph/readme.md)
- [DFS](notadded)
- [BFS](notadded)
3. [Shortest Path](Shortest%20Path/readme.md)
4. [Shortest Path](Shortest%20Path/readme.md)
- [Dijkstra's Algorithm](Traversal%20Algorithms/Dijkstra'sAlgorithm/readme.md)
- [Bellman Ford Algorithm](Shortest%20Path/BellmanFordAlgorithm/readme.md)
- [Bellman-Ford Algorithm](Bellman-Ford%20Algorithm/readme.md)
- [Floyd Warshall Algorithm](Shortest%20Path/FloydWarshallAlgorithm/readme.md)
4. [Spanning Tree Algorithm](Spanning%20Tree%20Algorithm/readme.md)
- [KruskalsAlgorithm](Spanning%20Tree%20Algorithm\KruskalsAlgorithm/readme.md)
- [PrimsAlgorithm](Spanning%20Tree%20Algorithm\PrimsAlgorithm/readme.md)]
5. [Spanning Tree Algorithm](Spanning%20Tree%20Algorithm/readme.md)
- [KruskalsAlgorithm](Spanning%20Tree%20Algorithm/KruskalsAlgorithm/readme.md)
- [PrimsAlgorithm](Spanning%20Tree%20Algorithm/PrimsAlgorithm/readme.md)
- [Disjoint Set Union / Union find](DSU/readme.md)
6. Strongly Connected Components
- [Kosaraju's Algorithm](Kosaraju%20Algorithm/readme.md)
8 changes: 4 additions & 4 deletions Algorithms/Greedy Algorithm/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
Greedy algorithms are a simple, intuitive class of algorithms that can be used to find the optimal solution to some optimization problems. They are called greedy because at each step they make the choice that seems best at that moment. This means that greedy algorithms do not guarantee to return the globally optimal solution, but instead make locally optimal choices in the hope of finding a global optimum. Greedy algorithms are used for optimization problems. An optimization problem can be solved using Greedy if the problem has the following property: at every step, we can make a choice that looks best at the moment, and we get the optimal solution to the complete problem.

## Popular Greedy Algorithms
* [Activity Selection](Not-added)
* Activity Selection
* [Huffman Coding](Huffman%20Coding%20Algorithm/readme.md)
* [Prim's Algorithm](Prim%27s%20Algorithm/readme.md)
* [Kruskal's Algorithm](Krushkal%27s%20Algorithm/readme.md)
* [Dijkstra's Algorithm](Dijkstra%27s%20Algorithm/readme.md)
* [Job Sequencing](not-added)
* [Fractional Knapsack](not-added)
* [Huffman Decoding](not-added)
* Job Sequencing
* Fractional Knapsack
* [Ford-Fulkerson Algorithm](Ford-Fulkerson/readme.md)
5 changes: 4 additions & 1 deletion Algorithms/Searching/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ A search algorithm is the step-by-step procedure used to locate specific data am


* [Sequential / Linear Search](./SequentialSearch/readme.md)
* [Linear Search](./LinearSearch/readme.md)
* [Binary Search](./BinarySearch/readme.md)
* [Hashing](./Hashing/readme.md)

* Jump Search
* Interpolation Search
* Exponential Search
2 changes: 1 addition & 1 deletion Algorithms/Sliding Window Algorithm/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Sliding window can be used on fixed-length windows or variable-length windows.
Eg. Find the largest subarray in a given array with sum equal to k.


You will understand more cleary when we will solve the questions by both the methods.
You will understand more clearly when we will solve the questions by both the methods.


### Popular Sliding Window Algorithms
Expand Down
9 changes: 4 additions & 5 deletions Algorithms/Sorting/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ the study of algorithms. There are several reasons:
Sometimes an application inherently needs to sort information. For example,
in order to prepare customer statements, banks need to sort checks by check
number.

Algorithms often use sorting as a key subroutine. For example, a program that
renders graphical objects which are layered on top of each other might have
to sort the objects according to an “above” relation so that it can draw these
Expand All @@ -18,16 +19,15 @@ ploy a rich set of techniques. In fact, many important techniques used through-
out algorithm design appear in the body of sorting algorithms that have been
developed over the years. In this way, sorting is also a problem of historical
interest.

We can prove a nontrivial lower bound for sorting (as we shall do in Chapter 8).
Our best upper bounds match the lower bound asymptotically, and so we know
that our sorting algorithms are asymptotically optimal. Moreover, we can use
the lower bound for sorting to prove lower bounds for certain other problems.
Many engineering issues come to the fore when implementing sorting algo-
rithms. The fastest sorting program for a particular situation may depend on
Many engineering issues come to the fore when implementing sorting algorithms. The fastest sorting program for a particular situation may depend on
many factors, such as prior knowledge about the keys and satellite data, the
memory hierarchy (caches and virtual memory) of the host computer, and the
software environment. Many of these issues are best dealt with at the algorith-
mic level, rather than by “tweaking” the code.
software environment. Many of these issues are best dealt with at the algorithmic level, rather than by “tweaking” the code.

### Popular Sorting Algorithms
- [Bubble Sort](BubbleSort/readme.md)
Expand All @@ -41,4 +41,3 @@ mic level, rather than by “tweaking” the code.
- [Shell Sort](ShellSort/readme.md)
- [Count Sort](CountSort/readme.md)
- [Tim Sort](TimSort/readme.md)

Loading

0 comments on commit 83eb4c0

Please sign in to comment.