Skip to content

Commit 0646ad2

Browse files
committed
Organized
1 parent 8d20ac6 commit 0646ad2

File tree

1 file changed

+55
-58
lines changed

1 file changed

+55
-58
lines changed

README.md

Lines changed: 55 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -8,41 +8,19 @@ These notes can be used to find top patterns for each category. Moreover, it can
88
- [Bari's YouTube playlist](https://www.youtube.com/watch?v=0IAPZzGSbME&list=PLDN4rrl48XKpZkf03iYFl-O29szjTrs_O) [If you are a beginner]
99

1010

11-
For Academia:
12-
- [CLRS book](https://www.amazon.com/Introduction-Algorithms-3rd-MIT-Press/dp/0262033844)
13-
14-
- [COT 5405: Design & Analysis Algorithms](http://www.cs.ucf.edu/~sharma/COT5405)
15-
- [COT 6410: Computational Complexity](http://www.cs.ucf.edu/courses/cot6410/Spring2021/COT6410Spring2021.html)
16-
17-
Overview of problems:
18-
19-
- [Interview Problems for ML engineers](https://mlengineer.io/common-leetcode-questions-by-categories-532b301130b)
20-
- [Interview Problems + Solutions](https://github.com/ashfarhangi/Data-Structures-and-Algorithms/blob/master/Leetcode-Problems.ipynb)
21-
22-
Machine Learning Inteviews:
23-
24-
- [Cracking ML inteviews](https://github.com/shafaypro/CrackingMachineLearningInterview)
25-
- [Machine Learning Interviews](https://github.com/khangich/machine-learning-interview)
26-
27-
Practice problems:
28-
29-
- [Problem sets from textbook](https://www.amazon.com/Data-Structure-Algorithmic-Thinking-Python/dp/8192107590)
30-
- [Online programming](https://leetcode.com/)
31-
32-
## 1. Orientation to the Machine Learning Foundations Series
33-
34-
- [Data Structures, Algorithms, and Machine Learning Optimization](https://www.oreilly.com/library/view/data-structures-algorithms/9780137644889/)
35-
- The foundations should be strong. By large, CS concepts are standalone (no need for linear algebra, ...) ![](media/outline.png)
11+
# 1. Foundation
12+
- By large, CS concepts can be standalone. However, you might need to build upon other elements. For instance, in ML, there is a need for Linear Algebra, Calculus and Statistics.
13+
![](media/outline.png)
3614
- Reasons for using DSA in ML:
3715
- Finding the correct DS for various situations
3816
- Be thoughtful for time/space complexity in:
3917
- Model Training
40-
- Model deployment in larger scale
41-
- **Software 2.0:** Assuming the fixed batch size, Deep Learning algos typically have **constant time (Compute)/space(RAM)** complexity
42-
- We also learn how to implement ML models as graphs
43-
- Low-level PyTorch
18+
- Model deployment in larger scale
19+
- Software 2.0: Assuming the fixed batch size, Deep Learning algos typically have a constant time/space complexity (GPU/RAM)
20+
- Implement ML models as graphs
4421

45-
## 2. Big O Notion
22+
Source: [Data Structures, Algorithms, and Machine Learning Optimization](https://www.oreilly.com/library/view/data-structures-algorithms/9780137644889/)
23+
# 2. Big O Notion
4624

4725
![](media/runfi.png)
4826

@@ -58,7 +36,13 @@ We keep the *m*. Given that in might be large. ![](media/sol.png)
5836

5937
# 3. Data structures
6038

61-
List ![](types.png) ![](media/best.png)
39+
40+
- List based data structures:
41+
![](types.png)
42+
- Common data structures:
43+
![](media/28a37a2c4d8794faa0b22686c21cbece.png)
44+
- Big O notion
45+
![](media/best.png)
6246

6347
Linked lists are not indexed. Only nodes are linked toghether. ![](media/linked.png)
6448

@@ -68,17 +52,15 @@ Linked lists are not indexed. Only nodes are linked toghether. ![](media/linked.
6852
- Queue: beginning and end are available. You can also take a peek of the first one.
6953
- Deques (دک) (Double ended- queue):
7054

71-
# Data Structures and Algorithms (CS)
55+
# 4. Algorithms
7256

7357
The summary of **Data Structures and Algorithms** plus **Interview steps** from Udacity's nano degree "Data Structures and Algorithms".
7458

7559
I’ve included the code for each concept in Python in the code folder. I would suggest to implement short codes for your projects or coding interviews.
7660

77-
# How to solving algorithm problems:
61+
## Solution to any problems
7862

79-
![](media/807b5c8aee182baaa1713c01e98994f9.png)
80-
81-
Think in simple term:
63+
Think in simple terms:
8264

8365
1. What are the inputs
8466
2. What are the outputs
@@ -104,11 +86,12 @@ Q: For inputs (dates), what are the valid inputs? Q: How input are encoded? (yyy
10486

10587
Tips: Break into simple parts so that we can see our progress. Write simple small codes that work No need to figure out all the details.
10688

107-
# Concepts:
89+
![](media/807b5c8aee182baaa1713c01e98994f9.png)
90+
10891

10992
Now we look into the main topics that are being covered in most interviews/coding challenges. We also look into the patterns that appear in solutions which can be used in new problems. The goal is to understand the fundamentals and try to use them to solve problems.
11093

111-
## Big O Notion:
94+
## Big O Notion
11295

11396
As the input to an algorithm increases, the time required to run the algorithm may also increase.
11497

@@ -148,13 +131,14 @@ Int , float 4 bytes
148131

149132
char 1 byte
150133

151-
## Comparison
152-
153-
Finding the smallest of n numbers:(n-1)
154-
Finding the biggest of n numbers:(n-1)
155-
Finding the smallest and the biggest of n numbers:(2n-3)
156-
157-
## Search
134+
## Binary Search
135+
What are time complexity of the following problems?
136+
Finding the smallest of n numbers?
137+
• O(n-1)
138+
Finding the biggest of n numbers?
139+
• O(n-1)
140+
Finding the smallest and the biggest of n numbers?
141+
• O(2n-3)
158142

159143
**Binary search (Middle …. Middle, O (log(n)).:**
160144

@@ -172,13 +156,13 @@ Finding the smallest and the biggest of n numbers:(2n-3)
172156

173157
Middle, Middle, Middle.
174158

175-
## Sorting:
159+
## Sorting
176160

177161
**Bubble sort:**
178162

179163
Simplest and most inefficient one O(n\^2)
180164

181-
## Merge Sort (divide, merge):
165+
**Merge Sort:**
182166

183167
Using divide and conquer, first, we divide 2 by 2
184168

@@ -194,7 +178,7 @@ O (n Log (n))
194178

195179
Why we are seeing log (n) in our efficiency? Hint: same as binary search problem
196180

197-
## Quick Sort (divide, merge):
181+
**Quick Sort:**
198182

199183
Pick one and move it around
200184

@@ -240,9 +224,9 @@ Everythin less than 8 are already below 8 so cemented
240224

241225
**Efficiency:**
242226

243-
**O(n2) if it’s already sorted. Why? Wasting time**
227+
O(n2) if it’s already sorted. Why? Wasting time
244228

245-
## Dynamic programming:
229+
## Dynamic Programming
246230

247231
(Programming == tables)
248232

@@ -315,7 +299,8 @@ Suppose this number not a prime? 1324 if the answer is no it can be verified qui
315299

316300
Class Co-NP: \_No\_ polytime
317301

318-
## Greedy Algorithm (Best option at each step):
302+
## Greedy Algorithm
303+
(Best option at each step)
319304

320305
![](media/44d46f063fca4872104e6edb1a26e63d.png)
321306

@@ -333,8 +318,8 @@ Example:
333318

334319
Min operations example {see code}: By using while, in dividing numbers in half // == / and using
335320

336-
## Graph algorithm (data structure that shows relation):
337-
321+
## Graph Algorithm
322+
(data structure that shows relation)
338323
Graph(Tree is a subgroup of graph,Network) Nodes(Vertex) Edges
339324

340325
![](media/d5e6c36b1d10faaaf0d1ae40e3182cca.png)
@@ -359,7 +344,7 @@ Let’s define 3 variables
359344

360345
Final answer we be the best solution out of these both (A[i] B[i] )
361346

362-
# Technical Interview
347+
# 5. Technical Interview
363348

364349
Now lets focus on the technical interviews. We tend to simplify the concepts by using memory palace techniques. I adivse everyone to develop a memory palace for algorithms/techniques that requrie knowledge about more than 6-7 steps.
365350

@@ -448,16 +433,28 @@ Test cases: input None -\> return 0 so its working
448433

449434
So [[1,0,1],[1,1,0). Go ahead, that looks good. Now I’m adding both of these. And I probably {} O looks like I forget to {add a return} Looks like it works.
450435

451-
# Python programming:
452436

453437
\<\<\<\<\<\<\< HEAD while(len(q)!= 0):
454438

455-
**6. Debug:**
456-
457439
And run it by
458440

459441
{oh looks like I forget to}
460442

461443
Looks like it works.
462444

463-
![](media/28a37a2c4d8794faa0b22686c21cbece.png)
445+
446+
# 6. Practice Problems
447+
DSA problems:
448+
- [Algorithmic Thinking](https://www.amazon.com/Data-Structure-Algorithmic-Thinking-Python/dp/8192107590)
449+
- [LeetCode](https://leetcode.com/)
450+
451+
Machine Learning:
452+
- [Cracking ML inteviews](https://github.com/shafaypro/CrackingMachineLearningInterview)
453+
- [Machine Learning Interviews](https://github.com/khangich/machine-learning-interview)
454+
- - [Interview Problems for ML engineers](https://mlengineer.io/common-leetcode-questions-by-categories-532b301130b)
455+
- [Interview Problems + Solutions](https://github.com/ashfarhangi/Data-Structures-and-Algorithms/blob/master/Leetcode-Problems.ipynb)
456+
457+
The following sources can be used for academia and research:
458+
- [CLRS book](https://www.amazon.com/Introduction-Algorithms-3rd-MIT-Press/dp/0262033844)
459+
- [COT 5405: Design & Analysis Algorithms](http://www.cs.ucf.edu/~sharma/COT5405)
460+
- [COT 6410: Computational Complexity](http://www.cs.ucf.edu/courses/cot6410/Spring2021/COT6410Spring2021.html)

0 commit comments

Comments
 (0)