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👍✨
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
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.
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 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
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 🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩.......
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
bhaiya, chahe swap kare ya na kare, compare to ho hi raha hai already sorted ke case me, to best case ki bhi to O(n^2) honi chahiye n. jaise selection sort me aapne bola best case me compare ho raha hai to best bhi O(n^2) hi hoga. please reply
╰‿╯ 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
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
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 !!
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
Full code for java Bubble Short:- package Algorithms; import java.util.*; class bubbleSort{ public int[] my_logic_bubbleSort(int[] a, int n){ for(int i=1; i
Bhaiya I have a problem . When I see questions in your video i easily solve them but when I go on different online coding platforms like code studio , gfg ..etc I'm not able to solve simple question even I don't understand what to do or how to start the question . What should I do ?? Please help
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🙇♂
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
lets rename the topic " Babbar sort "
krli bakchodi 😅,ho gyi placement 😂
bro, can u share abt ur placement update
Hua kya kisi ka bhai log@@anuragkumar4624
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😄😄
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
Bestest video on bubble sort,I have came across.
Blessed to have this series!!☺
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?
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.
19:38 pr pattern wala point dekh kr mza aa gya bhiya ji 🤩
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
When you say "Hello ji kese ho saare 😎😎😎😎" ❤️❤️❤️❤️
Attandance marked bhaiya ❤️
th-cam.com/video/SzHFW2i4JDU/w-d-xo.html
When you optimised the code it was a very exciting moment
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 😇
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;
Just watched the video. Lagta h ab life m kabhi bubble sort ki video ni dekhani pdegi. Content is 🔥🔥🔥🔥
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.
Present sir!!!!......Thank you bhaiya for this course🙏🙏😍😍
Present sir!!!!! Course going smoothly... Thanks a million ❤️❤️
th-cam.com/video/SzHFW2i4JDU/w-d-xo.html
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
You have completed 3/3 questions.
Your accuracy is 100%.
gfg quiz
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
Lecture 17 Complete as well! Thanks Bhaiyya
Onto the Next Video😃😇
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🔥🔥
he is all in one legend and epalians better than any professor or uni teacher
it is stable algorithm , as we are not using
The series beyond the paid course ❤️❤️
th-cam.com/video/SzHFW2i4JDU/w-d-xo.html
simply best series on dsa on youtube.
Bhaiya roz videos upload kar diya karo taki continuity bani rahe
Following every video from start
❤️❤️❤️❤️❤️❤️
Bubble sort done !!
course ekdam makkhan jesaa rha he 😂 #Namaste_Duniya #AlwaysLoveBabbar
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.
bahut badiya pada rahe ho . thank you so much.
Lovely bhaiya... Thanku sooooo much itne sare examples batate ho doubt ka d b ni rhta...thankuuuuuuu
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?
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 🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩.......
best course on the internet change my mind thanks for the amazing lectures
present bhaiya ,ek dam jhakas wala course hai
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
bhia bohat zabardst playlist hai 1 dam mast or kamaal ke ahi
💫💣 aag series bana diye ho bhaiya
best course on youtube
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 .
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.
If yeh course successfully complete hua na time pe toh this will be the best best best course ever
bhaiya dekh li hai ye wali aaj, abhi homework krne ke baad insertion sort pe badd jaunga, thankyou sir🙏🏻
💝💝💝💝💝💝💝
Best DSA series on TH-cam
💝💝💝💝💝💝💝
The way you explain every concepts is far better than my university teacher's.
firstly implement it in vs code,for basic understanding ,then simply switch to any of the cp platform
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🙏🏻
The swapped(boolean ) part was new for me , learned something new...
bhaiya confidence to aara h 🔥🔥
Hands on chal rahe hai bhaiya but dekhunga jaroor ye video
bahut badhiya chalra ha apki kripa se bhaiya🔥😊❤
Thank you so much bhaiya for this great dsa course.. loves the way you teach
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
Thank you so much bhaiya ❤😍
Let's start bubble sort😋😋😋
I sticked untill last minute. I am liking it.
bhaiya, chahe swap kare ya na kare, compare to ho hi raha hai already sorted ke case me, to best case ki bhi to O(n^2) honi chahiye n. jaise selection sort me aapne bola best case me compare ho raha hai to best bhi O(n^2) hi hoga. please reply
╰‿╯ 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
Thanku so much sir for this mind blowing series😊😊
you are rockstar bhaiya etnaa easy way mai batna koi aap sai shike
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
Lecture 07: 14-09-2024
Lecture 08: 15-09-2024
Lecture 10: 18-09-2024
Lecture 12: 18-09-2024
Lecture 13: 18-09-2024
Lecture 14: 21-09-2024
Lecture 15: 23-09-2024
Lecture 16: 24-09-2024
Lecture 17: 24-09-2024
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🙏🏻
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 guy is amazing
Really thanks
Full code for java Bubble Short:-
package Algorithms;
import java.util.*;
class bubbleSort{
public int[] my_logic_bubbleSort(int[] a, int n){
for(int i=1; i
Bubble sort is in-place algorithm. Basically it means that no extra space is required by this algorithm.
bubble sort is stable and in-place algorithm.
In Place Algo: No requirement of Extra Space for manipulating the input.
Bubble Sort and Selection Sort is the in place sort.
Thank you bhaiya. Understood bubble sort completely. 👍👍
The whole game was of i=1 and j
Bhaiya I have a problem .
When I see questions in your video i easily solve them but when I go on different online coding platforms like code studio , gfg ..etc
I'm not able to solve simple question even I don't understand what to do or how to start the question .
What should I do ?? Please help
karte h iske liye bhi kuch
tension na lo, contest ka intent yehi hai, taaki hum smjh paaye k hum kaha stand krre h.
Thank you bhaiya
th-cam.com/video/XbaA1-BI-zw/w-d-xo.html
Today's Attendance Marked!💯😊
thank you bhaiyaa ❤✌
done with homework..
Babbar bhaiyya present.
Class attend karna late aur jaldhi hoga. But class attend karna jarur he🔥
Solve kar diye gfg vala tino question.......
Whaaa bhiyaa maza arela hai🙌🙌👍❤
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;
}
}
Bhaiya video done, moving on to next lecture.
omg the optimised code was amazing .
Ek dil mil jata toh baat ban jaati
best explanation i have ever seen
Bhaiya contest start krwa do
this video is easiest among all previous video
As usual marking present bhaiya.
Zabbardast majja aa gaya...
Yes it is both inplace and a stable algorithm.
Thanks a lot this is easiest way of code bubble sorting
Unable to enter into contest
Mark the attendance bhaiya😊🔥❤️
*#DSAbusted*
*#believeinlovebabbarbhaiya*
thank you bhaiya , done with BUBBLE SORT 🙏🙏
Maja aaya bhaiya.... bahut bahut thank you..😎😎
Bubble sort is stable and in-place sort 🔥 🔥🔥💯
Bhaiya continue video plz waiting lambi ho jati h 😁
Present bhaiyajiii
Reach ++
life saver hats off man