Skip to content

Commit 35f4333

Browse files
authored
[Fix] Numbered Lists on Documentation / Readability (#87)
Fixes --- #84 Which should all now be addressed in every page where viable. Note: --- See each commit and changes separately for comments and why and how. ON MERGE PLEASE SQUASH THEM TOGETHER instead of individually!
2 parents c3413af + 3448d17 commit 35f4333

File tree

10 files changed

+387
-333
lines changed

10 files changed

+387
-333
lines changed

docs/Concepts/Algorithms.md

Lines changed: 159 additions & 153 deletions
Original file line numberDiff line numberDiff line change
@@ -9,216 +9,222 @@ has_children: false
99
{{ page.title }}
1010
======================
1111

12-
In computer science, algorithms are sets of instructions or procedures designed to solve specific problems or accomplish tasks. They form the backbone of all programs, dictating the sequence of operations to be performed for given inputs to produce desired outputs. The efficiency of an algorithm is often measured in terms of time and space complexity, which respectively indicate the speed and memory usage of the algorithm.
12+
Algorithms are sets of instructions, procedures designed to solve specific problems or accomplish tasks. Forming the backbone of programs/software, dictating the sequence of operations to be performed for given inputs to produce desired outputs. The efficiency of an algorithm is often measured in terms of time and space complexity, which respectively indicate the speed and memory usage of the algorithm.
1313

14-
## Types of Algorithms
14+
---
15+
16+
## Types of Algorithms:
17+
18+
1. **Sorting Algorithms**
1519

16-
### Sorting Algorithms
20+
Sorting algorithms are used to rearrange a list of items in a specific order. The most common sorting algorithms are:
1721

18-
Sorting algorithms are used to rearrange a list of items in a specific order. The most common sorting algorithms are:
22+
- Bubble Sort
23+
- Insertion Sort
24+
- Selection Sort
25+
- Merge Sort
26+
- Quick Sort
27+
- Heap Sort
28+
- Radix Sort
1929

20-
- Bubble Sort
21-
- Insertion Sort
22-
- Selection Sort
23-
- Merge Sort
24-
- Quick Sort
25-
- Heap Sort
26-
- Radix Sort
30+
2. **Searching Algorithms**
2731

28-
### Searching Algorithms
32+
Searching algorithms are used to find a specific item in a list of items. The most common searching algorithms are:
2933

30-
Searching algorithms are used to find a specific item in a list of items. The most common searching algorithms are:
34+
- Linear Search
35+
- Binary Search
36+
- Jump Search
37+
- Interpolation Search
38+
- Exponential Search
39+
- Fibonacci Search
40+
- Ternary Search
3141

32-
- Linear Search
33-
- Binary Search
34-
- Jump Search
35-
- Interpolation Search
36-
- Exponential Search
37-
- Fibonacci Search
38-
- Ternary Search
42+
3. **Graph Algorithms**
3943

40-
### Graph Algorithms
44+
Graph algorithms are used to traverse or search through a graph data structure. The most common graph algorithms are:
4145

42-
Graph algorithms are used to traverse or search through a graph data structure. The most common graph algorithms are:
46+
- Breadth-First Search
47+
- Depth-First Search
48+
- Dijkstra's Algorithm
49+
- Bellman-Ford Algorithm
50+
- Floyd-Warshall Algorithm
51+
- Prim's Algorithm
52+
- Kruskal's Algorithm
4353

44-
- Breadth-First Search
45-
- Depth-First Search
46-
- Dijkstra's Algorithm
47-
- Bellman-Ford Algorithm
48-
- Floyd-Warshall Algorithm
49-
- Prim's Algorithm
50-
- Kruskal's Algorithm
54+
4. **String Algorithms**
5155

52-
### String Algorithms
56+
String algorithms are used to perform operations on strings. The most common string algorithms are:
5357

54-
String algorithms are used to perform operations on strings. The most common string algorithms are:
58+
- Longest Common Subsequence
59+
- Longest Increasing Subsequence
60+
- Knuth-Morris-Pratt Algorithm
61+
- Rabin-Karp Algorithm
62+
- Z Algorithm
63+
- Boyer-Moore Algorithm
5564

56-
- Longest Common Subsequence
57-
- Longest Increasing Subsequence
58-
- Knuth-Morris-Pratt Algorithm
59-
- Rabin-Karp Algorithm
60-
- Z Algorithm
61-
- Boyer-Moore Algorithm
65+
5. **Geometric Algorithms**
6266

63-
### Geometric Algorithms
67+
Geometric algorithms are used to perform operations on geometric objects. The most common geometric algorithms are:
6468

65-
Geometric algorithms are used to perform operations on geometric objects. The most common geometric algorithms are:
69+
- Convex Hull
70+
- Closest Pair of Points
71+
- Line Intersection
72+
- Line Segment Intersection
73+
- Bentley-Ottmann Algorithm
74+
- Graham Scan
75+
- Jarvis March
6676

67-
- Convex Hull
68-
- Closest Pair of Points
69-
- Line Intersection
70-
- Line Segment Intersection
71-
- Bentley-Ottmann Algorithm
72-
- Graham Scan
73-
- Jarvis March
77+
6. **Mathematical Algorithms**
7478

75-
### Mathematical Algorithms
79+
Mathematical algorithms are used to perform mathematical operations. The most common mathematical algorithms are:
7680

77-
Mathematical algorithms are used to perform mathematical operations. The most common mathematical algorithms are:
81+
- Sieve of Eratosthenes
82+
- Euclidean Algorithm
83+
- Extended Euclidean Algorithm
84+
- Fast Fourier Transform
85+
- Karatsuba Algorithm
86+
- Miller-Rabin Primality Test
87+
- Pollard's Rho Algorithm
7888

79-
- Sieve of Eratosthenes
80-
- Euclidean Algorithm
81-
- Extended Euclidean Algorithm
82-
- Fast Fourier Transform
83-
- Karatsuba Algorithm
84-
- Miller-Rabin Primality Test
85-
- Pollard's Rho Algorithm
89+
7. **Other Algorithms**
8690

87-
### Other Algorithms
91+
Other algorithms are used to perform miscellaneous operations. The most common other algorithms are:
8892

89-
Other algorithms are used to perform miscellaneous operations. The most common other algorithms are:
93+
- Topological Sorting
94+
- Minimum Spanning Tree
95+
- Maximum Flow
96+
- Minimum Cut
97+
- Karger's Algorithm
98+
- K-Nearest Neighbors Algorithm
99+
- PageRank Algorithm
90100

91-
- Topological Sorting
92-
- Minimum Spanning Tree
93-
- Maximum Flow
94-
- Minimum Cut
95-
- Karger's Algorithm
96-
- K-Nearest Neighbors Algorithm
97-
- PageRank Algorithm
101+
---
102+
103+
## Algorithm Design Techniques:
98104

99-
## Algorithm Design Techniques
105+
1. **Brute Force**
100106

101-
### Brute Force
107+
Brute force algorithms are used to solve problems by trying every possible solution and selecting the best one. They are often the easiest to implement, but they are also the least efficient. The most common brute force algorithms are:
102108

103-
Brute force algorithms are used to solve problems by trying every possible solution and selecting the best one. They are often the easiest to implement, but they are also the least efficient. The most common brute force algorithms are:
109+
- Brute Force Search
110+
- Brute Force String Matching
111+
- Brute Force Subset Sum
112+
- Brute Force Closest Pair of Points
113+
- Brute Force Convex Hull
114+
- Brute Force Knapsack Problem
115+
- Brute Force Traveling Salesman Problem
104116

105-
- Brute Force Search
106-
- Brute Force String Matching
107-
- Brute Force Subset Sum
108-
- Brute Force Closest Pair of Points
109-
- Brute Force Convex Hull
110-
- Brute Force Knapsack Problem
111-
- Brute Force Traveling Salesman Problem
117+
2. **Divide and Conquer**
112118

113-
### Divide and Conquer
119+
Divide and conquer algorithms are used to solve problems by breaking them down into smaller subproblems, solving each subproblem recursively, and then combining the solutions to the subproblems to solve the original problem. The most common divide and conquer algorithms are:
114120

115-
Divide and conquer algorithms are used to solve problems by breaking them down into smaller subproblems, solving each subproblem recursively, and then combining the solutions to the subproblems to solve the original problem. The most common divide and conquer algorithms are:
121+
- Merge Sort
122+
- Quick Sort
123+
- Binary Search
124+
- Strassen's Algorithm
125+
- Karatsuba Algorithm
126+
- Closest Pair of Points
127+
- Convex Hull
128+
- Fast Fourier Transform
116129

117-
- Merge Sort
118-
- Quick Sort
119-
- Binary Search
120-
- Strassen's Algorithm
121-
- Karatsuba Algorithm
122-
- Closest Pair of Points
123-
- Convex Hull
124-
- Fast Fourier Transform
130+
3. **Dynamic Programming**
125131

126-
### Dynamic Programming
132+
Dynamic programming algorithms are used to solve problems by breaking them down into overlapping subproblems, solving each subproblem recursively, and then storing the solutions to the subproblems in a table to avoid recomputing them when needed. The most common dynamic programming algorithms are:
127133

128-
Dynamic programming algorithms are used to solve problems by breaking them down into overlapping subproblems, solving each subproblem recursively, and then storing the solutions to the subproblems in a table to avoid recomputing them when needed. The most common dynamic programming algorithms are:
134+
- Fibonacci Sequence
135+
- Longest Common Subsequence
136+
- Longest Increasing Subsequence
137+
- Knapsack Problem
138+
- Bellman-Ford Algorithm
129139

130-
- Fibonacci Sequence
131-
- Longest Common Subsequence
132-
- Longest Increasing Subsequence
133-
- Knapsack Problem
134-
- Bellman-Ford Algorithm
140+
4. **Greedy**
135141

136-
### Greedy
142+
Greedy algorithms are used to solve problems by making the locally optimal choice at each step, with the hope of eventually reaching the globally optimal solution. The most common greedy algorithms are:
137143

138-
Greedy algorithms are used to solve problems by making the locally optimal choice at each step, with the hope of eventually reaching the globally optimal solution. The most common greedy algorithms are:
144+
- Dijkstra's Algorithm
145+
- Prim's Algorithm
146+
- Kruskal's Algorithm
147+
- Huffman Coding
148+
- Activity Selection Problem
149+
- Fractional Knapsack Problem
150+
- Job Sequencing Problem
139151

140-
- Dijkstra's Algorithm
141-
- Prim's Algorithm
142-
- Kruskal's Algorithm
143-
- Huffman Coding
144-
- Activity Selection Problem
145-
- Fractional Knapsack Problem
146-
- Job Sequencing Problem
152+
5. **Backtracking**
147153

148-
### Backtracking
154+
Backtracking algorithms are used to solve problems by trying partial solutions and then abandoning them if they are not suitable. The most common backtracking algorithms are:
149155

150-
Backtracking algorithms are used to solve problems by trying partial solutions and then abandoning them if they are not suitable. The most common backtracking algorithms are:
156+
- N-Queens Problem
157+
- Knight's Tour Problem
158+
- Hamiltonian Cycle Problem
159+
- Subset Sum Problem
160+
- Sudoku Solver
151161

152-
- N-Queens Problem
153-
- Knight's Tour Problem
154-
- Hamiltonian Cycle Problem
155-
- Subset Sum Problem
156-
- Sudoku Solver
162+
6. **Branch and Bound**
157163

158-
### Branch and Bound
164+
Branch and bound algorithms are used to solve problems by recursively partitioning the search space into smaller subspaces and then eliminating subspaces that cannot contain the optimal solution. The most common branch and bound algorithms are:
159165

160-
Branch and bound algorithms are used to solve problems by recursively partitioning the search space into smaller subspaces and then eliminating subspaces that cannot contain the optimal solution. The most common branch and bound algorithms are:
166+
- Traveling Salesman Problem
167+
- Knapsack Problem
168+
- Job Sequencing Problem
169+
- Graph Coloring Problem
170+
- Sum of Subsets Problem
161171

162-
- Traveling Salesman Problem
163-
- Knapsack Problem
164-
- Job Sequencing Problem
165-
- Graph Coloring Problem
166-
- Sum of Subsets Problem
172+
7. **Randomized**
167173

168-
### Randomized
174+
Randomized algorithms are used to solve problems by introducing randomness into the algorithm. The most common randomized algorithms are:
169175

170-
Randomized algorithms are used to solve problems by introducing randomness into the algorithm. The most common randomized algorithms are:
176+
- Randomized Quick Sort
177+
- Randomized Selection
178+
- Karger's Algorithm
179+
- Miller-Rabin Primality Test
180+
- Randomized Primality Test
171181

172-
- Randomized Quick Sort
173-
- Randomized Selection
174-
- Karger's Algorithm
175-
- Miller-Rabin Primality Test
176-
- Randomized Primality Test
182+
8. **Approximation**
177183

178-
### Approximation
184+
Approximation algorithms are used to solve problems by finding approximate solutions when exact solutions are too computationally expensive. The most common approximation algorithms are:
179185

180-
Approximation algorithms are used to solve problems by finding approximate solutions when exact solutions are too computationally expensive. The most common approximation algorithms are:
186+
- Greedy Algorithm
187+
- Randomized Algorithm
188+
- Local Search Algorithm
189+
- Simulated Annealing
190+
- Genetic Algorithm
181191

182-
- Greedy Algorithm
183-
- Randomized Algorithm
184-
- Local Search Algorithm
185-
- Simulated Annealing
186-
- Genetic Algorithm
192+
9. **Heuristic**
187193

188-
### Heuristic
194+
Heuristic algorithms are used to solve problems by finding approximate solutions when exact solutions are too computationally expensive. The most common heuristic algorithms are:
189195

190-
Heuristic algorithms are used to solve problems by finding approximate solutions when exact solutions are too computationally expensive. The most common heuristic algorithms are:
196+
- Greedy Algorithm
197+
- Randomized Algorithm
198+
- Local Search Algorithm
199+
- Simulated Annealing
200+
- Genetic Algorithm
191201

192-
- Greedy Algorithm
193-
- Randomized Algorithm
194-
- Local Search Algorithm
195-
- Simulated Annealing
196-
- Genetic Algorithm
202+
---
197203

198-
## Algorithm Analysis
204+
## Algorithm Analysis:
199205

200-
### Time Complexity
206+
1. **Time Complexity**
201207

202-
Time complexity is a measure of the amount of time required to run an algorithm. It is often expressed using Big O notation, which is an asymptotic notation that describes the limiting behavior of a function when the argument tends towards a particular value or infinity. The most common time complexities are:
208+
Time complexity is a measure of the amount of time required to run an algorithm. It is often expressed using Big O notation, which is an asymptotic notation that describes the limiting behavior of a function when the argument tends towards a particular value or infinity. The most common time complexities are:
203209

204-
- Constant Time: O(1)
205-
- Logarithmic Time: O(log n)
206-
- Linear Time: O(n)
207-
- Linearithmic Time: O(n log n)
208-
- Quadratic Time: O(n<sup>2</sup>)
209-
- Cubic Time: O(n<sup>3</sup>)
210-
- Exponential Time: O(2<sup>n</sup>)
211-
- Factorial Time: O(n!)
210+
- Constant Time: O(1)
211+
- Logarithmic Time: O(log n)
212+
- Linear Time: O(n)
213+
- Linearithmic Time: O(n log n)
214+
- Quadratic Time: O(n<sup>2</sup>)
215+
- Cubic Time: O(n<sup>3</sup>)
216+
- Exponential Time: O(2<sup>n</sup>)
217+
- Factorial Time: O(n!)
212218

213-
### Space Complexity
219+
2. **Space Complexity**
214220

215-
Space complexity is a measure of the amount of memory required to run an algorithm. It is often expressed using Big O notation, which is an asymptotic notation that describes the limiting behavior of a function when the argument tends towards a particular value or infinity. The most common space complexities are:
221+
Space complexity is a measure of the amount of memory required to run an algorithm. It is often expressed using Big O notation, which is an asymptotic notation that describes the limiting behavior of a function when the argument tends towards a particular value or infinity. The most common space complexities are:
216222

217-
- Constant Space: O(1)
218-
- Linear Space: O(n)
219-
- Quadratic Space: O(n<sup>2</sup>)
220-
- Cubic Space: O(n<sup>3</sup>)
221-
- Exponential Space: O(2<sup>n</sup>)
223+
- Constant Space: O(1)
224+
- Linear Space: O(n)
225+
- Quadratic Space: O(n<sup>2</sup>)
226+
- Cubic Space: O(n<sup>3</sup>)
227+
- Exponential Space: O(2<sup>n</sup>)
222228

223229
---
224230

0 commit comments

Comments
 (0)