You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> You need to have basic understanding of the Python programming language to proceed with the codes from this repository.
4
-
Python 3 is used for the implementation of the data structures and Algorithms
5
-
6
-
4
+
> Python 3 is used for the implementation of the data structures and Algorithms
7
5
8
6
## Table of Contents
9
-
-[Introduction to Python](#introduction)
10
-
-[Data Structure](./Data%20Structure/)
11
-
-[Linked List](./Data%20Structure/Linked%20List/)
12
-
-[Stack](./Data%20Structure/Stack/)
13
-
-[Queue](./Data%20Structure/Queue/)
14
-
- Binary Search Tree (BST)
15
-
- Heap
16
-
- Hash Table
17
-
- Disjoint Set Union (Union Find)
18
-
- Trie
19
-
- Suffix Array
20
-
- Segment Tree
21
-
- Binary Indexed Tree (BIT)
22
-
- Heavy Light Decomposition
23
7
8
+
*[Introduction to Python](#introduction)
9
+
*[Data Structure](./Data%20Structure/)
10
+
*[Linked List](./Data%20Structure/Linked%20List/)
11
+
*[Stack](./Data%20Structure/Stack/)
12
+
*[Queue](./Data%20Structure/Queue/)
13
+
* Binary Search Tree (BST)
14
+
*[Heap](./Data%20Structure/Heap/)
15
+
* Hash Table
16
+
* Disjoint Set Union (Union Find)
17
+
* Trie
18
+
* Suffix Array
19
+
* Segment Tree
20
+
* Binary Indexed Tree (BIT)
21
+
* Heavy Light Decomposition
24
22
25
23
-[Searching](./Searching/)
26
-
-[Linear Search](./Searching/Linear%20Search/)
27
-
-[Binary Search](./Searching/Binary%20Search/)
28
-
-[Ternary Search](./Searching/Ternary%20Search/)
29
-
30
-
31
-
-[Sorting](./Sorting/)
32
-
- Selection Sort
33
-
-[Bubble Sort](./Sorting/Bubble%20Sort/)
34
-
- Insertion Sort
35
-
- Merge Sort
36
-
- Quick Sort
37
-
- Bucket Sort
38
-
- Counting Sort
39
-
- Heap Sort
40
-
- Radix Sort
41
-
24
+
*[Linear Search](./Searching/Linear%20Search/)
25
+
*[Binary Search](./Searching/Binary%20Search/)
26
+
*[Ternary Search](./Searching/Ternary%20Search/)
27
+
28
+
*[Sorting](./Sorting/)
29
+
* Selection Sort
30
+
*[Bubble Sort](./Sorting/Bubble%20Sort/)
31
+
* Insertion Sort
32
+
* Merge Sort
33
+
* Quick Sort
34
+
* Bucket Sort
35
+
* Counting Sort
36
+
* Heap Sort
37
+
* Radix Sort
42
38
43
39
- Graph Algorithms
44
-
- Graph Representation
45
-
- Breadth First Search (BFS)
46
-
- Depth First Search (DFS)
47
-
- Topological Sort
48
-
- Strongly Connected Components (SCC)
49
-
- Minimum Spanning Tree (MST)
50
-
- All Pairs Shortest Path (Floyd Warshall's Algorithm)
51
-
- Single Source Shortest Path Algorithm
52
-
- Djkastra's Algorithm
53
-
- Bellman Ford Algorithm
54
-
- Directed Acyclic Graph
55
-
- Bipartite Matching
56
-
- Articulation Point, Bridge
57
-
- Euler Tour/Path
58
-
- Hamiltonian Cycle
59
-
- Stable Marriage Problem
60
-
- Chinese Postman Problem
61
-
- 2-satisfiability
62
-
- Flow Algorithms
63
-
- Maximum Flow
64
-
- Minimum Cut
65
-
- Min-Cost Max Flow
66
-
- Maximum Bipartite Matching
67
-
- Vertex Cover
68
-
69
-
- Dynamic Programming
70
-
- Rod Cutting
71
-
- Maximum Sum (1D, 2D)
72
-
- Coin Change
73
-
- Longest Common Subsequence
74
-
- Longest Increasing Subsequence
75
-
- Matrix Multiplication
76
-
- Edit Distance (Levenshtein distance)
77
-
- 0/1 Knapsack
78
-
- Travelling Salesman Problem
79
-
- Optimal Binary Search Tree
80
-
81
40
82
-
- Greedy Algorithms
83
-
- Activity Selection/Task Scheduling
84
-
- Huffman Coding
85
-
- Knapsack Problem (Fractional Knapsack)
41
+
* Graph Representation
42
+
* Breadth First Search (BFS)
43
+
* Depth First Search (DFS)
44
+
* Topological Sort
45
+
* Strongly Connected Components (SCC)
46
+
* Minimum Spanning Tree (MST)
47
+
* All Pairs Shortest Path (Floyd Warshall's Algorithm)
48
+
* Single Source Shortest Path Algorithm
49
+
* Djkastra's Algorithm
50
+
* Bellman Ford Algorithm
51
+
* Directed Acyclic Graph
52
+
* Bipartite Matching
53
+
* Articulation Point, Bridge
54
+
* Euler Tour/Path
55
+
* Hamiltonian Cycle
56
+
* Stable Marriage Problem
57
+
* Chinese Postman Problem
58
+
* 2-satisfiability
59
+
* Flow Algorithms
60
+
* Maximum Flow
61
+
* Minimum Cut
62
+
* Min-Cost Max Flow
63
+
* Maximum Bipartite Matching
64
+
* Vertex Cover
86
65
66
+
- Dynamic Programming
67
+
* Rod Cutting
68
+
* Maximum Sum (1D, 2D)
69
+
* Coin Change
70
+
* Longest Common Subsequence
71
+
* Longest Increasing Subsequence
72
+
* Matrix Multiplication
73
+
* Edit Distance (Levenshtein distance)
74
+
* 0/1 Knapsack
75
+
* Travelling Salesman Problem
76
+
* Optimal Binary Search Tree
77
+
78
+
* Greedy Algorithms
79
+
* Activity Selection/Task Scheduling
80
+
* Huffman Coding
81
+
* Knapsack Problem (Fractional Knapsack)
87
82
88
83
- String Algorithms
89
-
- Rabin-Karp Algorithm
90
-
- Knuth-Morris-Pratt Algorithm
91
-
- Z Algorithm
92
-
- Aho-Korasick Algorithm
93
-
- Manachers Algorithm
94
-
- Boyr-Moore Algorithm
95
-
96
-
97
-
- Number Theory
98
-
- Greatest Common Divisor (GCD)
99
-
- Longest Common Multiplier (LCM)
100
-
- Euler Totient (Phi)
101
-
- Primality Testing
102
-
- Prime finding(Sieve of Eratosthenes)
103
-
- Prime factorization
104
-
- Factorial
105
-
- Fibonacci
106
-
- Counting, Permutation, combination
107
-
- Exponentiation
108
-
- Big Mod
109
-
- Euclid, Extended euclid
110
-
- Josephus Problem
111
-
- Farey Sequence
112
-
- Catalan numbers
113
-
- Burnside's lemma/circular permutation
114
-
- Modular inverse
115
-
- Probability
116
-
- Chinese Remainder Theorem
117
-
- Gaussian Elimination method
118
-
- Dilworth's Theorem
119
-
- Matrix Exponentiation
120
-
84
+
* Rabin-Karp Algorithm
85
+
* Knuth-Morris-Pratt Algorithm
86
+
* Z Algorithm
87
+
* Aho-Korasick Algorithm
88
+
* Manachers Algorithm
89
+
* Boyr-Moore Algorithm
90
+
91
+
* Number Theory
92
+
* Greatest Common Divisor (GCD)
93
+
* Longest Common Multiplier (LCM)
94
+
* Euler Totient (Phi)
95
+
* Primality Testing
96
+
* Prime finding(Sieve of Eratosthenes)
97
+
* Prime factorization
98
+
* Factorial
99
+
* Fibonacci
100
+
* Counting, Permutation, combination
101
+
* Exponentiation
102
+
* Big Mod
103
+
* Euclid, Extended euclid
104
+
* Josephus Problem
105
+
* Farey Sequence
106
+
* Catalan numbers
107
+
* Burnside's lemma/circular permutation
108
+
* Modular inverse
109
+
* Probability
110
+
* Chinese Remainder Theorem
111
+
* Gaussian Elimination method
112
+
* Dilworth's Theorem
113
+
* Matrix Exponentiation
121
114
122
115
- Computational Geometry
123
-
- Pick's Theorem
124
-
- Convex hull
125
-
- Line Intersection
126
-
- Point in a polygon
127
-
- Area of a polygon
128
-
- Line Sweeping
129
-
- Polygon intersection
130
-
- Closest Pair
131
-
132
-
133
-
- Game Theory
134
-
- Take Away Game
135
-
- Nim's Game
136
-
- Sprague-grundy Number
137
-
138
-
- Others
139
-
- BackTracking
140
-
- N-Queen's Problem
141
-
-[Tower of Hanoi Problem](./Others/Tower%20of%20Hanoi/)
116
+
* Pick's Theorem
117
+
* Convex hull
118
+
* Line Intersection
119
+
* Point in a polygon
120
+
* Area of a polygon
121
+
* Line Sweeping
122
+
* Polygon intersection
123
+
* Closest Pair
124
+
125
+
* Game Theory
126
+
127
+
* Take Away Game
128
+
* Nim's Game
129
+
* Sprague-grundy Number
130
+
131
+
* Others
132
+
* BackTracking
133
+
* N-Queen's Problem
134
+
*[Tower of Hanoi Problem](./Others/Tower%20of%20Hanoi/)
142
135
143
136
---
144
137
145
138
## Introduction
146
139
147
-
148
140
### Big-O Notation and Time Complexity Analysis
149
141
150
142
[Algorithms in plain English: time complexity and Big-O notation](https://medium.freecodecamp.com/time-is-complex-but-priceless-f0abd015063c)
@@ -156,15 +148,19 @@ Python 3 is used for the implementation of the data structures and Algorithms
156
148
Install Python 3.x in your machine [from here](https://www.python.org/downloads/release/python-343/) (if it's already not installed) and add it to your environment path so that it is accessible in terminal commands.
157
149
158
150
Then you can run a Python file like this:
151
+
159
152
```python
160
153
python file.py
161
154
```
155
+
162
156
or
157
+
163
158
```python
164
159
python3 file.py
165
160
```
166
161
167
162
### Useful Links:
163
+
168
164
*[Algorithms, 4th Edition (book by: Robert Sedgewick and Kevin Wayne)](http://algs4.cs.princeton.edu/home/)
169
165
*[Khan Academy tutorial on Algorithms](https://www.khanacademy.org/computing/computer-science/algorithms)
0 commit comments