|
1 | 1 | # Coding Problems |
2 | 2 |
|
3 | | -My solutions for many various coding/algorithmic problems (this repo will be updated with new solutions from time to time). \ |
4 | | -All solutions are written in [Python](https://www.python.org/) (more precisely, [Python 3](https://docs.python.org/3)), using the [Built-in Functions](https://docs.python.org/3/library/functions.html) (print, len, range, sorted, sum, min, max, etc...) and few modules from the [Python Standard Library](https://docs.python.org/3/library/) like: |
| 3 | +Here you can find [solutions](#Solutions) for various coding/algorithmic problems and many useful [resources](#Learning-Resources) for learning algorithms and data structures.\ |
| 4 | +Also, this repo will be updated with new solutions from time to time. |
| 5 | + |
| 6 | +*Note that this repo is meant to be used for learning and researching purposes only and it is **not** meant to be used for production.* |
| 7 | + |
| 8 | + |
| 9 | +## Solutions |
| 10 | + |
| 11 | +All solutions are written in [Python](https://www.python.org/) (more precisely, [Python 3](https://docs.python.org/3)), using the [Built-in Functions](https://docs.python.org/3/library/functions.html) (print, len, range, sorted, sum, min, max, etc...) and a few modules from the [Python Standard Library](https://docs.python.org/3/library/) like: |
5 | 12 | - [math](https://docs.python.org/3/library/math.html) (used for constants like math.pi, math.inf and functions like math.ceil, math.floor, math.gcd, math.log, math.pow, math.sqrt, etc) |
6 | 13 | - [collections](https://docs.python.org/3/library/collections.html) (used for [collections.deque](https://docs.python.org/3/library/collections.html#collections.deque) when there is a need for [Stack](https://en.wikipedia.org/wiki/Stack_(abstract_data_type)) or [Queue](https://en.wikipedia.org/wiki/Queue_(abstract_data_type)) data structures) |
7 | 14 | - [heapq](https://docs.python.org/3/library/heapq.html) (used when there is a need for [Priority Queue](https://en.wikipedia.org/wiki/Priority_queue) data structure). |
8 | 15 |
|
9 | 16 | So, to execute these solutions there is no need from installing any external packages. \ |
10 | 17 | Coding style and name conventions are described in this file [PEP8](https://www.python.org/dev/peps/pep-0008). \ |
11 | | -These problems are from sites like [LeetCode](https://leetcode.com/) (you can find around 35 sites like this in the [Training Sites](#Training-Sites) section).\ |
12 | | -Also in this README you can find many resources for learning algorithms: [Courses](#Courses), [Books](#Books), [Training Sites](#Training-Sites), [Other Resources](#Other-Resources). |
| 18 | +These problems are from sites like [LeetCode](https://leetcode.com/) (you can find around 35 sites like this in the [Training Sites](#Training-Sites) section). |
13 | 19 |
|
14 | 20 |
|
15 | | -## Categories |
| 21 | +### Template |
16 | 22 |
|
17 | | -Each solution/problem in this repo belongs to one of these categories: |
18 | | - |
19 | | -1. [Strings](/) |
20 | | -2. [Arrays](/) |
21 | | -3. [Linked Lists](/) |
22 | | -4. [Trees](/) |
23 | | -5. [Dynamic Programming](/) |
24 | | -6. [Backtracking](/) |
25 | | -7. [Graphs](/) |
26 | | -8. [Math](/) |
27 | | -9. [Other](/) |
28 | | - |
29 | | - |
30 | | -## Template |
31 | | - |
32 | | -Each file with solution in this repo will have the following template: |
| 23 | +For easier navigation into the solutions, each file with a solution in this repo will have the following template: |
33 | 24 |
|
34 | 25 | ```python |
35 | 26 | ''' |
@@ -83,7 +74,28 @@ print(name_of_solution_1('example1')) |
83 | 74 | print(name_of_solution_2('example2')) |
84 | 75 | ``` |
85 | 76 |
|
86 | | -## Courses |
| 77 | + |
| 78 | +### Categories |
| 79 | + |
| 80 | +Each solution/problem in this repo belongs to one of these categories: |
| 81 | + |
| 82 | +1. [Strings](/) |
| 83 | +2. [Arrays](/) |
| 84 | +3. [Linked Lists](/) |
| 85 | +4. [Trees](/) |
| 86 | +5. [Dynamic Programming](/) |
| 87 | +6. [Backtracking](/) |
| 88 | +7. [Graphs](/) |
| 89 | +8. [Math](/) |
| 90 | +9. [Other](/) |
| 91 | + |
| 92 | + |
| 93 | +## Learning Resources |
| 94 | + |
| 95 | +The learning resources are divided into 4 categories: [Courses](#Courses), [Books](#Books), [Training Sites](#Training-Sites), [Other Resources](#Other-Resources). |
| 96 | + |
| 97 | + |
| 98 | +### Courses |
87 | 99 |
|
88 | 100 | Collection of free courses from one of the best CS universities. |
89 | 101 |
|
@@ -118,25 +130,18 @@ Collection of free courses from one of the best CS universities. |
118 | 130 | - [Efficient Algorithms and Intractable Problems - CS170](https://cs170.org/) |
119 | 131 |
|
120 | 132 |
|
121 | | -## Books |
| 133 | +### Books |
122 | 134 |
|
123 | 135 | Several books that have made an impression on me: |
124 | 136 |
|
125 | | -1. [Grokking Algorithms by Aditya Bhargava](https://www.goodreads.com/book/show/22847284-grokking-algorithms-an-illustrated-guide-for-programmers-and-other-curio) - The best book for complete beginners in algorithms! I wish this book existed when I started learning algorithms. |
| 137 | +1. [Grokking Algorithms by Aditya Bhargava](https://www.goodreads.com/book/show/22847284-grokking-algorithms-an-illustrated-guide-for-programmers-and-other-curio) - **The best** book for complete beginners in algorithms! I wish this book existed when I started learning algorithms. |
126 | 138 | 2. [Introduction to Algorithms by CLRS](https://www.goodreads.com/book/show/6752187-introduction-to-algorithms) - This book is called "bible textbook of algorithms" by many programmers. |
127 | 139 | 3. [Algorithms by Robert Sedgewick & Kevin Wayne](https://www.goodreads.com/book/show/10803540-algorithms) - These authors are instructors of the previously mentioned coursera courses: [Algorithms Part 1](https://www.coursera.org/learn/algorithms-part1) and [Algorithms Part 2](https://www.coursera.org/learn/algorithms-part2). Also this book has excellent and free [site](http://algs4.cs.princeton.edu) with exercises, presentations, and examples. |
128 | 140 | 4. [The Algorithm Design Manual by Steven Skiena](https://www.goodreads.com/book/show/425208.The_Algorithm_Design_Manual) - The book describes many advanced topics and algorithms and it focuses on real life practical examples. This book has one of the best [site](http://www.algorist.com) with resources ([solutions](http://www.algorist.com/algowiki/index.php/The_Algorithms_Design_Manual_(Second_Edition)), [algorithms and data structures](http://www.algorist.com/algorist.html), [python implementations](http://www.algorist.com/languages/Python.html)). |
| 141 | +5. [Algorithms by S. Dasgupta, C. Papadimitriou, and U. Vazirani](https://www.goodreads.com/book/show/138563.Algorithms) - This book is an official book for algorithms and data structures classes in several famous universities. |
129 | 142 |
|
130 | | -## Other Resources |
131 | | - |
132 | | -1. [Geeks For Geeks](https://www.geeksforgeeks.org/) - The site which all interested in algorithms (no matter if beginners or experts) should know! |
133 | | -2. [The Algorithms - Python](https://github.com/TheAlgorithms/Python) - Great GitHub repo with many algorithms written in Python ([Link](https://github.com/TheAlgorithms) for the rest languages). |
134 | | -3. [KhanAcademy - Algorithms](https://www.khanacademy.org/computing/computer-science/algorithms) - Good explanations for some basic algorithms. |
135 | | -4. HackerRank - YouTube tutorials |
136 | | - - [Algorithms](https://www.youtube.com/playlist?list=PLI1t_8YX-ApvMthLj56t1Rf-Buio5Y8KL) |
137 | | - - [Data Structures](https://www.youtube.com/playlist?list=PLI1t_8YX-Apv-UiRlnZwqqrRT8D1RhriX) |
138 | 143 |
|
139 | | -## Training Sites |
| 144 | +### Training Sites |
140 | 145 |
|
141 | 146 | If the problems from [LeetCode](https://leetcode.com/) are not enough and you need more problems like those, you can find much more on these platforms: |
142 | 147 |
|
@@ -175,4 +180,14 @@ If the problems from [LeetCode](https://leetcode.com/) are not enough and you ne |
175 | 180 | - [CheckiO](http://www.checkio.org/) |
176 | 181 | - [FightCode](http://fightcodegame.com/) |
177 | 182 | - [Kaggle](http://kaggle.com/) |
178 | | -- [Rosalind](http://rosalind.info/problems/locations/) |
| 183 | +- [Rosalind](http://rosalind.info/problems/locations/) |
| 184 | + |
| 185 | + |
| 186 | +### Other Resources |
| 187 | + |
| 188 | +1. [Geeks For Geeks](https://www.geeksforgeeks.org/) - The site which **all** interested in algorithms (no matter if beginners or experts) should know! |
| 189 | +2. [The Algorithms - Python](https://github.com/TheAlgorithms/Python) - Great GitHub repo with many algorithms written in Python ([Link](https://github.com/TheAlgorithms) from the same repo written in other programming languages). |
| 190 | +3. [KhanAcademy - Algorithms](https://www.khanacademy.org/computing/computer-science/algorithms) - Good explanations for some basic algorithms. |
| 191 | +4. HackerRank - YouTube tutorials |
| 192 | + - [Algorithms](https://www.youtube.com/playlist?list=PLI1t_8YX-ApvMthLj56t1Rf-Buio5Y8KL) |
| 193 | + - [Data Structures](https://www.youtube.com/playlist?list=PLI1t_8YX-Apv-UiRlnZwqqrRT8D1RhriX) |
0 commit comments