|
1 |
| -#Intro |
| 1 | +# Learn Data Structure and Algorithms by Python |
2 | 2 |
|
| 3 | +> 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 |
3 | 5 |
|
4 |
| -### Primitive types or data structures in Python |
5 |
| -Integer, Float, Boolean, Char |
| 6 | + |
| 7 | + |
| 8 | +## 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 | + |
| 24 | + |
| 25 | +- [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 | + |
| 42 | + |
| 43 | +- 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 | + |
| 82 | +- Greedy Algorithms |
| 83 | + - Activity Selection/Task Scheduling |
| 84 | + - Huffman Coding |
| 85 | + - Knapsack Problem (Fractional Knapsack) |
| 86 | + |
| 87 | + |
| 88 | +- 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 | + |
| 121 | + |
| 122 | +- 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/) |
| 142 | + |
| 143 | +--- |
| 144 | + |
| 145 | +## Introduction |
| 146 | + |
| 147 | + |
| 148 | +### Big-O Notation and Time Complexity Analysis |
| 149 | + |
| 150 | +[Algorithms in plain English: time complexity and Big-O notation](https://medium.freecodecamp.com/time-is-complex-but-priceless-f0abd015063c) |
| 151 | + |
| 152 | +[Big-O Cheat Sheet Link](http://bigocheatsheet.com/) |
| 153 | + |
| 154 | +### How to Use |
| 155 | + |
| 156 | +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 | + |
| 158 | +Then you can run a Python file like this: |
| 159 | +```python |
| 160 | +python file.py |
| 161 | +``` |
| 162 | +or |
| 163 | +```python |
| 164 | +python3 file.py |
| 165 | +``` |
| 166 | + |
| 167 | +### Useful Links: |
| 168 | +* [Algorithms, 4th Edition (book by: Robert Sedgewick and Kevin Wayne)](http://algs4.cs.princeton.edu/home/) |
| 169 | +* [Khan Academy tutorial on Algorithms](https://www.khanacademy.org/computing/computer-science/algorithms) |
| 170 | +* [Topcoder Tutorials](https://www.topcoder.com/community/data-science/data-science-tutorials/) |
| 171 | +* [GeeksforGeeks](http://www.geeksforgeeks.org/) |
| 172 | +* [hackerearth Tutorial](https://www.hackerearth.com/practice/) |
0 commit comments