selection sort -- in every round the smallest value takes their correct place. bubble sort - in every round the largest value takes their correct place.
@@nagasaipurvaz4251 then it will be sorted in descending order, similarly in bubble sort if we swap when arr[i] < arr[i+1] then it will be descending too...
bhaiya after watching too many dsa related videos on TH-cam I finally came across this dsa series and I started watching your videos I must say that it's a lifesaver, bhaiya you are just nailing it like you explain so well you give us a fodu vibe when i watch your video it's like I am just going and going it's endless ocean from where i don't wanna get out i never had thought you'll end up making dsa just a game. your teaching style is way better than most of the 20 or 30 years experienced. Bhaiya just keep it up i wish, at the end of the this dsa journey we all who followed seriously will be able to crack our dream companies. Thankyou bhaiya.....just keep it up
Soo I'm telling you guyss this is the bestest series of dsa I have ever seen ....after struggling from 1.5 years I lastly found my point thankyou so much bhaiyaa for this amazing series 💜will continue this till the end... All the best bhaiya👍✨
Bhaiya thank you so much for this course. I have 2 suggestions/feedback:- 1. Before jumping to the optimal solution please do tell us the naive way to solve it. 2. After covering all the topics related to particular sections(eg Sorting, recursion, etc), do conduct one coding test, so we will be able to test our knowledge and revise the already taught topics. Thanks again ✌
Awesome way of explaining complex concepts. By far the bestest DSA course on youtube. Trust me, when I say this. I live in the UK but nobody over here can explain stuff with the simplicity that you do. Kudos to you and such selfless way of gifting knowledge to millions. I am learning Java but I can better understand concepts from you than the paid course I have taken here in the UK. Please please please do something for students who want JAVA concepts too. I know C++ & Java both are Object oriented but there are no pointers in Java.
thank you sir for this amazing course. 1. bubble sort is a stable algorithm 2. yes bubble sort is in place sort because it does not use additional space
I have a subscription of a paid course (bhayiya k sponsers😁 ) but literally babbar bhayiya's this dsa series is far better and much detailed than that . Bhayiya is keeping his words -QUALITY TOP NOCH HOGI Thanks alot bhayiya and keep doing this great work
i usually dont comment on videos but the efforts of bhaiya made me comment. this is really an amazing course. thank you so much. and bhaiya please dont stop this course in between like other youtubers. THANK YOU SO MUCH FOR YOUR EFFORTS;
Sir, ye video me hamesha yad rakhunga sir mai🔥 ye mera phela code tha kisi platform pr khud se kiya hua... Apne jo last me jo approach boli (i=0 and j=i+1) video k first 8 min he code likh kr sare test cases pass kr diye the❤️❤️❤️ Thank you Bhaiya🔥🔥
Bhaiya Maine bahut teji se video dekhke homework complete karke ja raha hu ta ki apka agla video aane ke pehele Maine 46 th video Tak pahach jau.... 😐😐😐😐 Channel PE Anne me der ho gya.... 🙏🙏🙏🙏 Amazing 😍😍😍😍 teaching..... amazing 🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩.......
Bhaiya late hu but Present bhaiya !!!! Daily 6 hr de rha hu umeed yhi hai ye mehnat baad m thoda sa rang dikhaye bakki clg bh hai sleep k sath thoda compro krna pdh rha hai bss mehnaat krta jata hu fruit of labour k bbare m baad m sochengey
bubble sort is an in place sorting algorithm as it does not uses the extra space for its manipulation , while it may use some spaces for their operations.
Bubble sort is stable algorithm because we are swapping adjacent elements unlike Selection sort where we swapped by comparing i'th element with rest of the elements
I implemented the code before you shared the code. This is my code which got runtime of 28 ms and performed better than 97.7%. it used while loop. while(length!=0){ int i=0; while(i
Bhaiya hum selection sort ko eek aur techniques se krr sakte hai Aur uski time complexity bhi isse kam hogi Hum kya karenege eek loop chala denge poore array me aur uske baad hum minimum value store kara lenge Aur phir usko swap krr denge pahle wale ke saath
these are bit of easy topic compared to binary search problem, so need less time in closing this video. all and all this is very good video over this topic. thanks bro
thanks babbar sir i made the logic by myself and execute it #include void bubbleSort(vector& arr, int n) { // Write your code here. for(int i=0;i arr[j]) swap(arr[i],arr[j]); }
╰‿╯ In-Place : in-place means sorting without any extra space requirement. In-Place : Bubble Sort, Selection Sort, Insertion & Heap Sort Not In-Place : Merge Sort
Love Babbar bhaiya aapke course me alag hi vibe hoti hai . Baki sabka course ek taraf aapka sabse accha vibe wala bass mai yehi kahunga ki aap iss course ko band mt kariyega jbtk khatam nahi hojata . because there are lakhs of hopes behind you !!! YOU ARE DOING GREAT WORK BHAIYA !! KEEP IT UP !!
Thanks for all the content and this course. One request though: Please don't post content everyday. It's getting harder to keep up. Every other day is fine.
You can watch it whenever you are free but there are many students who are in their 3rd yr or 4th and they want it to finish it fast so that they can get placement, so you try to get some time from your routine that will be very helpful for you as well.
This is one more method of bubble sort which is according to the example given in the question , we can see in the question that array is sorting from the end , and this method is passing all the test cases. for(int i = n-1 ; i >= 1 ; i--){ bool sorted = false; for(int j = n-1 ; j >= n-i ; j--){ if(arr[j] < arr[j-1]){ swap(arr[j] , arr[j-1]); sorted = true; } } if(sorted == false){ break; } }
selection sort -- in every round the smallest value takes their correct place.
bubble sort - in every round the largest value takes their correct place.
we can also write selection sort for maximum value
the main difference is that bubble sort compares between adjecent elements
@@nagasaipurvaz4251 correct
devil bless you
@@AnkitKumar-ud4vt devil😂😂
@@nagasaipurvaz4251 then it will be sorted in descending order, similarly in bubble sort if we swap when arr[i] < arr[i+1] then it will be descending too...
@@AnkitKumar-ud4vt *God. Devil's blessings are worthless
bhaiya after watching too many dsa related videos on TH-cam I finally came across this dsa series and I started watching your videos I must say that it's a lifesaver, bhaiya you are just nailing it like you explain so well you give us a fodu vibe when i watch your video it's like I am just going and going it's endless ocean from where i don't wanna get out i never had thought you'll end up making dsa just a game. your teaching style is way better than most of the 20 or 30 years experienced. Bhaiya just keep it up i wish, at the end of the this dsa journey we all who followed seriously will be able to crack our dream companies. Thankyou bhaiya.....just keep it up
Bubble sort is a stable and in-place sorting algorithm. Great Lecture, Thank You🙇♂
Bestest video on bubble sort,I have came across.
Blessed to have this series!!☺
Soo I'm telling you guyss this is the bestest series of dsa I have ever seen ....after struggling from 1.5 years I lastly found my point thankyou so much bhaiyaa for this amazing series 💜will continue this till the end...
All the best bhaiya👍✨
Hey, can you tell me about your whole experience of this series
@@AMBUJ6 Purple heart
have you completed the series?
Good better best
@@31sagarkotwal32 lol
Bhaiya thank you so much for this course. I have 2 suggestions/feedback:-
1. Before jumping to the optimal solution please do tell us the naive way to solve it.
2. After covering all the topics related to particular sections(eg Sorting, recursion, etc), do conduct one coding test, so we will be able to test our knowledge and revise the already taught topics.
Thanks again ✌
Lecture 17 - Present
21:18 || 30:30
void bubbleSort(vector& arr, int n)
{
for(int i = 0; i
Thanku so much
th-cam.com/video/XbaA1-BI-zw/w-d-xo.html
bhaiya abb dry run krte acche se bann raha hai aur pattern wale concept ke wajha se thoda easy sa lagta hai ye krna thankyou bhaiya😄😄
Awesome way of explaining complex concepts. By far the bestest DSA course on youtube. Trust me, when I say this. I live in the UK but nobody over here can explain stuff with the simplicity that you do. Kudos to you and such selfless way of gifting knowledge to millions. I am learning Java but I can better understand concepts from you than the paid course I have taken here in the UK. Please please please do something for students who want JAVA concepts too. I know C++ & Java both are Object oriented but there are no pointers in Java.
lets rename the topic " Babbar sort "
krli bakchodi 😅,ho gyi placement 😂
bro, can u share abt ur placement update
thank you sir for this amazing course.
1. bubble sort is a stable algorithm
2. yes bubble sort is in place sort because it does not use additional space
how stable?
I have a subscription of a paid course (bhayiya k sponsers😁 ) but literally babbar bhayiya's this dsa series is far better and much detailed than that .
Bhayiya is keeping his words -QUALITY TOP NOCH HOGI
Thanks alot bhayiya and keep doing this great work
19:38 pr pattern wala point dekh kr mza aa gya bhiya ji 🤩
Thank you for the course Bhaiya
It's helping us a lot
th-cam.com/video/SzHFW2i4JDU/w-d-xo.html
th-cam.com/video/XbaA1-BI-zw/w-d-xo.html
i usually dont comment on videos but the efforts of bhaiya made me comment. this is really an amazing course. thank you so much. and bhaiya please dont stop this course in between like other youtubers. THANK YOU SO MUCH FOR YOUR EFFORTS;
Well Explained Bhaiya hamesha ki tarah saare doubts khalaas:)
Attendance marked!
I was very confused in sorting i am watching this video for 3rd time but i can proudly say i will never forget bubble sort thanks Mr babbar 😇
bahut badiya pada rahe ho . thank you so much.
When you optimised the code it was a very exciting moment
Just watched the video. Lagta h ab life m kabhi bubble sort ki video ni dekhani pdegi. Content is 🔥🔥🔥🔥
Bro ... Your DSA course is supp.. And amazing .... We are enjoying and learning this course ...
Please upload 1hr. Content .No problem for 1hr...
th-cam.com/video/SzHFW2i4JDU/w-d-xo.html
th-cam.com/video/XbaA1-BI-zw/w-d-xo.html
Bhaiya roz videos upload kar diya karo taki continuity bani rahe
Following every video from start
❤️❤️❤️❤️❤️❤️
You have completed 3/3 questions.
Your accuracy is 100%.
gfg quiz
Lovely bhaiya... Thanku sooooo much itne sare examples batate ho doubt ka d b ni rhta...thankuuuuuuu
Lecture 17 Complete as well! Thanks Bhaiyya
Onto the Next Video😃😇
When you say "Hello ji kese ho saare 😎😎😎😎" ❤️❤️❤️❤️
Attandance marked bhaiya ❤️
th-cam.com/video/SzHFW2i4JDU/w-d-xo.html
Sir, ye video me hamesha yad rakhunga sir mai🔥 ye mera phela code tha kisi platform pr khud se kiya hua... Apne jo last me jo approach boli (i=0 and j=i+1) video k first 8 min he code likh kr sare test cases pass kr diye the❤️❤️❤️
Thank you Bhaiya🔥🔥
Present sir!!!!......Thank you bhaiya for this course🙏🙏😍😍
it is stable algorithm , as we are not using
Bhaiya Maine bahut teji se video dekhke homework complete karke ja raha hu ta ki apka agla video aane ke pehele Maine 46 th video Tak pahach jau.... 😐😐😐😐
Channel PE Anne me der ho gya.... 🙏🙏🙏🙏
Amazing 😍😍😍😍 teaching..... amazing 🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩.......
Present sir!!!!! Course going smoothly... Thanks a million ❤️❤️
th-cam.com/video/SzHFW2i4JDU/w-d-xo.html
bhaiya dekh li hai ye wali aaj, abhi homework krne ke baad insertion sort pe badd jaunga, thankyou sir🙏🏻
Bhaiya late hu but Present bhaiya !!!!
Daily 6 hr de rha hu umeed yhi hai ye mehnat baad m thoda sa rang dikhaye
bakki clg bh hai sleep k sath thoda compro krna pdh rha hai
bss mehnaat krta jata hu fruit of labour k bbare m baad m sochengey
Ky raha bhai result?
he is all in one legend and epalians better than any professor or uni teacher
I know bubble sort but I am still watching this video because i love your way of explanation thank you so much for a precious DSA course like this .
bhaiyaa.. video roj continue rkho... skip mt kro... aur content 1hr + hoga bhi to koi dikkat ni
Bhai video cover-up Karne ke liye ekdin Diya tha sabko
@@amolnaikwade9004 aree usko choro na. Agar sachmei follow kr rha hota na... toh ye sb bakwaas nai krta..... spammer hai wo
@@sumitraj6878 👍
@@sumitraj6878 bhai spammer ni hu... continue follow kr rha.
bs mai ye kh rha tha ki.. roj video aati rhe.. continously without break
@@amolnaikwade9004 yep i know.
Bubble sort done !!
course ekdam makkhan jesaa rha he 😂 #Namaste_Duniya #AlwaysLoveBabbar
bhia bohat zabardst playlist hai 1 dam mast or kamaal ke ahi
Thank you so much bhaiya for this great dsa course.. loves the way you teach
firstly implement it in vs code,for basic understanding ,then simply switch to any of the cp platform
The series beyond the paid course ❤️❤️
th-cam.com/video/SzHFW2i4JDU/w-d-xo.html
best course on the internet change my mind thanks for the amazing lectures
Better than any other DSA course !!
DSA sheet ka wait h bhaiya 🙃🙃
th-cam.com/video/SzHFW2i4JDU/w-d-xo.html
th-cam.com/video/XbaA1-BI-zw/w-d-xo.html🙏🏻
Another method: (quite similar to the selection sort one ) ;
#include
using namespace std;
void sort_arr(int arr[], int size){
int e = size-1;
for(int k = 0; k
NICE
th-cam.com/video/XbaA1-BI-zw/w-d-xo.html
bubble sort is an in place sorting algorithm as it does not uses the extra space for its manipulation , while it may use some spaces for their operations.
present bhaiya ,ek dam jhakas wala course hai
Bubble sort is stable algorithm because we are swapping adjacent elements unlike Selection sort where we swapped by comparing i'th element with rest of the elements
The swapped(boolean ) part was new for me , learned something new...
The way you explain every concepts is far better than my university teacher's.
Present bhaiya loving the quality of this course. Can you please add topics like matrix, deque , segment tree, disjoint set
Thanku so much sir for this mind blowing series😊😊
h.w.1---Explanation: 1 : 8, 7, 9, 22, 5, 13, 31 = 4 swaps
2 : 7, 8, 9, 5, 13, 22, 31 = 3 swaps
3 : 7, 8, 5, 9, 13, 22, 31 = 1 swap
4 : 7, 5, 8, 9, 13, 22, 31 = 1 swap
5 : 5, 7, 8, 9, 13, 22, 31 = 1 swap
Total 10 swaps are required to sort the array.
I implemented the code before you shared the code.
This is my code which got runtime of 28 ms and performed better than 97.7%.
it used while loop.
while(length!=0){
int i=0;
while(i
you are rockstar bhaiya etnaa easy way mai batna koi aap sai shike
Hands on chal rahe hai bhaiya but dekhunga jaroor ye video
💫💣 aag series bana diye ho bhaiya
If yeh course successfully complete hua na time pe toh this will be the best best best course ever
bahut badhiya chalra ha apki kripa se bhaiya🔥😊❤
simply best series on dsa on youtube.
Bhaiya hum selection sort ko eek aur techniques se krr sakte hai
Aur uski time complexity bhi isse kam hogi
Hum kya karenege eek loop chala denge poore array me aur uske baad hum minimum value store kara lenge
Aur phir usko swap krr denge pahle wale ke saath
This is literally one of the best explaination of Bubble Sort.
Thank you so much!
Thank you so much bhaiya ❤😍
Let's start bubble sort😋😋😋
bhaiya confidence to aara h 🔥🔥
best course on youtube
these are bit of easy topic compared to binary search problem, so need less time in closing this video. all and all this is very good video over this topic.
thanks bro
The whole game was of i=1 and j
Bhaiya plz make a solution and approach video after today's contest. It will be really helpfulll.
Course is great.
I am sem1 student.
This guy is amazing
Really thanks
Bubble sort is in-place algorithm. Basically it means that no extra space is required by this algorithm.
Thank you bhaiya. Understood bubble sort completely. 👍👍
Babbar bhaiyya present.
Class attend karna late aur jaldhi hoga. But class attend karna jarur he🔥
Bhaiya continue video plz waiting lambi ho jati h 😁
I sticked untill last minute. I am liking it.
Babbar bhaiya , please make hand written notes available for remaining lectures. Thank you♥ for listening.
bubble sort is stable and in-place algorithm.
💝💝💝💝💝💝💝
Best DSA series on TH-cam
💝💝💝💝💝💝💝
Class accha laga
From Bangladesh
thank you bhaiyaa ❤✌
done with homework..
In Place Algo: No requirement of Extra Space for manipulating the input.
Bubble Sort and Selection Sort is the in place sort.
Zabbardast majja aa gaya...
this video is easiest among all previous video
Solve kar diye gfg vala tino question.......
Thanks a lot this is easiest way of code bubble sorting
thanks babbar sir i made the logic by myself and execute it
#include
void bubbleSort(vector& arr, int n)
{
// Write your code here.
for(int i=0;i arr[j])
swap(arr[i],arr[j]);
}
}
}
Y badhiya approach hai londe 😮
Watched, done 🤟, roz video prr 40-45min ki hi bss
Ek dil mil jata toh baat ban jaati
Whaaa bhiyaa maza arela hai🙌🙌👍❤
╰‿╯ In-Place :
in-place means sorting without any extra space requirement.
In-Place : Bubble Sort, Selection Sort, Insertion & Heap Sort
Not In-Place : Merge Sort
best explanation i have ever seen
Today's Attendance Marked!💯😊
Bhaiya video done, moving on to next lecture.
Unable to enter into contest
Love Babbar bhaiya aapke course me alag hi vibe hoti hai . Baki sabka course ek taraf aapka sabse accha vibe wala bass mai yehi kahunga ki aap iss course ko band mt kariyega jbtk khatam nahi hojata . because there are lakhs of hopes behind you !!! YOU ARE DOING GREAT WORK BHAIYA !! KEEP IT UP !!
th-cam.com/video/SzHFW2i4JDU/w-d-xo.html
th-cam.com/video/XbaA1-BI-zw/w-d-xo.html🙏🏻
for the first time in life, I understood bubble sort and selection sort that I couldn't understand for the last 1.5 year.
Also,in which language are you implementing it?
Wow sir maja aa gya gajab
Thanks for all the content and this course.
One request though: Please don't post content everyday. It's getting harder to keep up. Every other day is fine.
Agreed
You can watch it whenever you are free but there are many students who are in their 3rd yr or 4th and they want it to finish it fast so that they can get placement, so you try to get some time from your routine that will be very helpful for you as well.
th-cam.com/video/XbaA1-BI-zw/w-d-xo.html
Maza aa gaya bhaiya bilkul mast
This is one more method of bubble sort which is according to the example given in the question , we can see in the question that array is sorting from the end , and this method is passing all the test cases.
for(int i = n-1 ; i >= 1 ; i--){
bool sorted = false;
for(int j = n-1 ; j >= n-i ; j--){
if(arr[j] < arr[j-1]){
swap(arr[j] , arr[j-1]);
sorted = true;
}
}
if(sorted == false){
break;
}
}
I love you mere bhaiya ❤️❤️❤️
You are the best teacher
Bhaiyya please Sare lectures ke handwritten notes upload kardo plzz