Guys sorry this night just I've decided to have some rest. & It's hard to study. Cause I got bad cough😒😮💨
🫡1
I've pinned the message so in todays we gonna focus on DSA. You know that we were learning some types of sorting techniques. we stopped on merge sort. now let's begin it 👉🏽QUICK SORT on learning.... be with me🙏
Here I take this example then try to do with quick sort: Look at it👇👇👇👇
In the next I'll do the implementations part. I was just try to understand this concept. Now I understand the trick, we use in Quick sort technique. 🎉🎉🎉
[3, -2, -1, 0, 2, 4, 1]
at the first i take
pivot 1:
3 > 1, -2 < 1, -1 < 1, 0 < 1, 2 > 1, 4 > 1
then elements smaller that 1 are -2, -1, 0
elements greater than 1 are 3, 2, 4
and then [-2,-1,0] 1 [3, 2, 4]
now what i've to do is to arrange elements smaller than 1 as a pivot take 0
pivot 0: -2 < 0, -1 < 0 They're ordered
Know elements up to 1 are ordered:[-2, -1, 0, 1]
the next is to sort elements right of 1: those are [3, 2, 4]
as a pivot take 4:
3 < 4, 2 < 4 : [3, 2] 4 []
and know take 2 as a pivot: 3 > 2: then [] 2 [3]
combine the process right of 1: ->>[2, 3, 4] Done
now combine the elements left of 1: [-2, -1, 0, 1]
COMBINE ALL OF THEM: [-2, -1, 0, 1, 2, 3, 4] done
I understand in this way
""""
compare numbers with pivot
group them
sort left
sort right
combine
Average time: O(n log n)
""""
In the next I'll do the implementations part. I was just try to understand this concept. Now I understand the trick, we use in Quick sort technique. 🎉🎉🎉
https://www.almabetter.com/bytes/cheat-sheet/python
Take a look, it's useful resource
Take a look, it's useful resource
How are you all🤝
I know that, I didn't share for u some topics in this channel.
I was busy with class.
Whatever no worries, am gonna arrange it.⚡️
I know that, I didn't share for u some topics in this channel.
I was busy with class.
Whatever no worries, am gonna arrange it.⚡️
Hey at this night am about to work on some project.
So stay tuned, And tommorow we'll keep learn numpy from where we stoped 👌
So stay tuned, And tommorow we'll keep learn numpy from where we stoped 👌
SamiTech Code pinned «#Access array element import numpy as np num = np.array([2, 4, 5, 7]) print(num[0]) #access the first element:2 print(num[2] + num[3]) #Summation: 12 #Access 2-D array import numpy as np num = np.array([[2, 3, 4], [5, 1, 6]]) print(num[1, 2]) #3rd element…»
Hey guys:🖐
Therefore now we learn about Numpy array slicing.👇
In this morning, I was designing the UI of project am working on it. So now let's continue to our learning. You know that we're discussing on numpy and we try to cover; why it's needed to learn numpy, numpy creating arrays, numpy array indexing. No worries I've pinned the text.
Therefore now we learn about Numpy array slicing.👇
Now am studying Numerical Analysis I think some of you know that. Since We are learning Machine Learning and programming, numerical analysis helps in:👇
Many ML libraries internally use numerical methods.🧑💻
Optimization algorithms,
Training ML models,
Scientific simulations,
Computer graphics &
Data science
Many ML libraries internally use numerical methods.🧑💻
🤩2
Medium problem. Day 1 — 1st Problem👇 Today we gonna solve this problem and we'll discuss on it. Not only writing the implementations, giving some clarifications on it. https://leetcode.com/problems/add-two-numbers/description/
LeetCode
Add Two Numbers - LeetCode
Can you solve this real interview question? Add Two Numbers - You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and…
BEFORE CODING ASK YOUR SELF👇
1. What is the problem asking?
2. What are the inputs and outputs?
3. What are the constraints?
4. What brute force solution exists?
5. Can it be optimized?
6. What pattern fits this problem?
7. What is time complexity?
8. What is space complexity?
9. Best / Worst / Average case?
10. Write pseudocode
11. Then code
In addition when solving DSA always think👀 Input size → choose algorithm
Pattern → choose technique
Optimization → reduce complexity