Whenever Kunal says, Why we are doing it? The answer that rings in my mind is ... We will cover it in Object-Oriented Programming. :) Great Work Kunal Love your energy
I saw many videos on TH-cam and I am currently enrolled in a paid course but no one explains bubble shot Algorithm as detailed you explained to us and for the first time I heard about Stable and Unstable Sorting Algorithm type till now I never experienced that kind of detailed explanation so thank you so much for doing such a great thing for the community. #bhaiyon_Mein_bhaiya_Kunal_bhaiya
@@KunalKushwaha hey sir what to do if there is a number more than once time, if tried it short the whole array but at the end it didn't fix number which is more than one time I use an array {2,3,5,6,8,7,9,6} and it give me result {2,3,5,6,7,8,9,6} how to fix that
I'm a year 2 student studying CS in Hong Kong. I'm currently enrolled in my Data Structure course and we are in Week 2 now. My uni course hasn't been amazing because professors never put enough effort into teaching. I have been following your DSA Playlist since the beginning of August. The past month has been extraordinarily amazing and I'd say I owe you one for explaining "EVERY" tiny detail of JAVA which is the primary focus of Year 2 and explaining why EVERYTHING happens, which is extremely crucial. I will absolutely rely on your playlist for this semester for my DS Course. Really appreciate this hard work. Keep it up, brother!
This is my first comment of my life, it's because of you. I really really appreciate your effort to deep dive in every topic. This is the best lecture on Bubble sort. A huge respect for you.
I had also not scored well enough in 10th and 12th and also failed in JEE twice, I had lost all confidence untill I saw Kunal doing this great community work. I have now regained my confidence and will work hard along with your guidance and hope to do great in future. We are with you brother. #DSAwithKunal.
I did study this algorithm in college but at that time I didn't get why we were doing what we were doing and now thanks to Kunal I get it and suddenly everything makes sense, Thank you!!❤️
@@siddharthsid1540 it is just for checking if any swaps are occurring in the previous iteration , if there are no swaps ,then there is no point to go to next iteration and do this process again , instead of that we will terminate the process by checking this condition.
I had done 3 java courses and I still didn't get a lot of stuff. I thought I was quite dumb and not fit for it. But this course suddenly made a lot of things clear. I have been stuck in the same company for almost 3 years and now I think I'll be able to apply for jobs with confidence. Hats off to you for doing the unthinkable. I'll recommend everyone to go blindly for this course whether you're a noob or a pro.
its actually midnight 3.00 am here..im going through your DSA courses here...but i never felt asleep for a single second ...you are an ammazing mentor 🤩🤩🤩🤩 ....and the way you describe it was crystal clear ....Thank you so much bro 😇😇😇
I learnt Bubble sort 1st time in class 11 and i was like : kya h ye.... my CS teacher to me: DSA is not everyone's cup of tea ☕ so , u have to remember it for your exams(ratta laga lo ).. Also me now : Hauaa bna rakha h😒🤦♂️ I am in relationship with DSA now😎💕
Hey Kunal! It was an awesome lecture. Just to clarify, I is running 5 time if you see it in your code. But according to theory it should run actually 5-1= 4 times. We are starting from zero. So actually it should be, i < arr.length -1; So loop is running one extra time. Break is there to help it out obviously. But just for clarification if anyone has any doubt
Yep, the reason is that sometimes for code clarity such optimisations can be ignored. Also I mentioned we will discuss complexity in detail in time complexity lecture.
My professor went over all type of sorts in like half an hour, I got basically zero knowledge from that lecture. Thank you Kunal for giving effort to create such a detailed lecture on bubble sort.
Free Quality Education at its best . Thank you Kunal for putting such a complex topic in very simplified manner . This channel is gonna break some records in time to come!!! God bless you with everything today and always !!!
Thanks Kunal, it is really great, i tried by reducing the first loop after every run because last element is anyway the largest in array. // Here y is my array for(int count=y.length;count >0; count--){ for (int i=0;iy[i+1]) { int temp = y[i]; y[i] = y[i+1]; y[i+1] = temp; } } }
Hey Kunal you are doing fantabulous job bro. I had completed my undergrad last year and I started dsa from last month for career advancement .Literally speaking the way you explain thing in simple way is awesome.
30:16 for a second I thought how can someone take so long to add 1 + 2 + 3 + 4 lmao but then I got to know you were thinking something different. Anyways kudos to your efforts towards the community!
That entire calculation of time complexity got completely messed up. The reason lies with the mixing up of generic N and ignoring that N= 5 for that case. Otherwise, the calculation should be straight forward: N-1 + N-2 ......+ N-(N-1) = N(N-1)/2. Also, explaining a bit about the divide-and-conquer' approach as one of the main concepts in computational thinking should have saved a lot of time in the starting that went into explaining which looks more like hitting around a bush. kudos, Kunal!
Great work and explanation! A small point: The reason explained for N^2 time complexity seems incorrect. The N^2 term seems to have a minus sign which suggests time taken would decrease with increasing N. However, if the 4 in the first term, i.e. 4N, is instead written as (N-1)*N (as N is 5 in the example taken), then N^2 will have a positive sign overall.
Yes, you are right. It was only for this case, I didn't know how to explain before we cover complexity analysis. Hence, I'll cover complexity of each algorithm in that video.
Hey ! but for worst case Overall time complexity should be O(N^3) , on considering outer loop. You have considered only inner loop 31:20 as time complexity why?
@@aniketyadav6009 Same question comes into my mind i searched about it and come to know that outer loop is just iterating not taking any time (quite less which is ignorable) and most of the operations are being done in inner loop.
Thank you bhaiya for this amazing FREE course, getting lot of confidence when you are bursting all myth's around. It's true there is no such quality content in the internet #OPKUNALBHAIYA
Tomorrow I am going to explain all about bubble sort but before a day I want some confidence so that I saw the Kunal bubble sort video for the best explanation and that is amazing and after seeing this my confidence is like upper level(I am going to excite the class).
Amazing video man! never ever algorithms seemed this interesting to me. You know how DSA is taught in unis and this is way better than that. I mean absolutely no comparison there. Keep up the good work!!
The way you explained the time complexity is great for this sorting algorithm. Your videos are very detailed. Thanks a lot for the great content. I am hearing about stable and unstable sort for the first time, thanks a lot for explaining it with colors.
Very Nice explanation of all topics. Especially the questions you don't only solve it but also teach how to approach and how to think on our own. This is excellent teaching. Thank you very much.
I was struggling with sorting, and though this is a Java DSA playlist, I gave bubble sort a shot in my CPP code. Your explanation made it feel so easy, and I managed to code it without any trouble. Thanks a ton for providing such amazing free educational content. It really helped me out! Keep up the awesome work!
Like always Kunal, you've saved me the trouble of going through all the internet trying to grasp these concepts. Your approach to teaching makes it quite easy, thank you
when you talked about the boolean check, I was like amazed because every other person teaching bubble sort never talks about that. seriously that just 2-3 lines of code will have a big impact on time complexity when n is very big and array gets sorted before n^2 comparisions.
@@KunalKushwaha Your DSA playlist is excellent content I have found on the subject till date. I have not completed the entire playlist, but I can confidently say with the lectures so far I watched. Thanks again.
Honestly saying , I start my DSA in c++ from a TH-cam channel(if you know , you know), literally I am getting scared when I think about DSA. Now It's like..... 😂😂 You are GOD in Teaching KUNAL bhaiya . THANKS BRO..., I CAN'T EVEN TELL HOW MUCH I AM GRATE FULL TO YOU!!!
Haven't seen a detailed explanation on bubble sort in my life. My favorite part is the complexity analysis. @Kunal Kushwaha , you're proving again and again that this is the best DSA course. I'll say thank you for every video you're gonna post in future days.
Currently I am in the final year of my MCA and I found this playlist, if I would have found this earlier, my concept would have been lot more clearer, but I still decided to watch it, and with each and every video I am getting more and more excited, and learning a lot more thing with clarity. #dsa_god_kunal_kushwaha
Please make video on time and space complexity soon , i am the following the whole series got little bit idea want to know much abt it please make it soon ,more power to you :)
Yayyy, I always learn something new from you 🤗. You are a true gem 💎 Please complete the rest of the topics🥺too. Ab final year mein aagye hai And my tension is 📈
Where was this guy , hey Kunal I wish you were one year before, my Placements has started please wish me luck, trust me I have become fan of your teaching
Hi kunal sir Sorry for distributing But I want to appreciate your work Your explanation is very cristal clear for me Even your handwritten notes is very useful. That helped me very well As you told they is no course like this.i felted that too. Thank you very much
thank you for your lots of effort to students and for the community class room your course is really better than the paid course And now I am able to problems on leet code I cannot express my gratitude in words for you we are waiting for your more videos
@kunal please do codility challenges also since those seems very tough some time comparing to others. Really love 💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕 your explanation. May god bless you 🙏🙏🙏
The typical inner loop condition is j < n-i-1 to avoid unnecessary comparisons with the last element of the sorted portion, as it is already in its correct place. However, if your code works with j
DSA + interview preparation playlist: th-cam.com/play/PL9gnSGHSqcnr_DxHsP7AW9ftq0AtAyYqJ.html
Dart & Flutter course please
Whenever Kunal says, Why we are doing it? The answer that rings in my mind is ... We will cover it in Object-Oriented Programming. :) Great Work Kunal Love your energy
😂😂
😂😂😂😂
I saw many videos on TH-cam and I am currently enrolled in a paid course but no one explains bubble shot Algorithm as detailed you explained to us and for the first time I heard about Stable and Unstable Sorting Algorithm type till now I never experienced that kind of detailed explanation so thank you so much for doing such a great thing for the community.
#bhaiyon_Mein_bhaiya_Kunal_bhaiya
Thank You!
@@KunalKushwaha such a amazing Explanation
True, to a 100%
@@KunalKushwaha hey sir what to do if there is a number more than once time, if tried it short the whole array but at the end it didn't fix number which is more than one time I use an array {2,3,5,6,8,7,9,6} and it give me result {2,3,5,6,7,8,9,6} how to fix that
I'm a year 2 student studying CS in Hong Kong. I'm currently enrolled in my Data Structure course and we are in Week 2 now. My uni course hasn't been amazing because professors never put enough effort into teaching. I have been following your DSA Playlist since the beginning of August. The past month has been extraordinarily amazing and I'd say I owe you one for explaining "EVERY" tiny detail of JAVA which is the primary focus of Year 2 and explaining why EVERYTHING happens, which is extremely crucial. I will absolutely rely on your playlist for this semester for my DS Course. Really appreciate this hard work. Keep it up, brother!
Same here in canada haha..
Meanwhile in India these things are covered in 1st year two times, unofficially in 1st semester and officially in 2nd semester.
@@princenagar1686 hi fellow iiitbhian 👍
@@dab6923 hi, what's your name??
@princenagar1686 which college bro ?????
This is my first comment of my life, it's because of you. I really really appreciate your effort to deep dive in every topic. This is the best lecture on Bubble sort. A huge respect for you.
I had also not scored well enough in 10th and 12th and also failed in JEE twice, I had lost all confidence untill I saw Kunal doing this great community work. I have now regained my confidence and will work hard along with your guidance and hope to do great in future.
We are with you brother.
#DSAwithKunal.
kunal*
Nahi hoga Tera
@@obamaengineer4806 America ja bhai
@@obamaengineer4806 tu koun hota kahne wala ki Tera nhi hoga
@@Kunaltwtschutiya hai bro chor😂
I did study this algorithm in college but at that time I didn't get why we were doing what we were doing and now thanks to Kunal I get it and suddenly everything makes sense, Thank you!!❤️
why did he write swapped=false after for loop ?
@@siddharthsid1540 it is just for checking if any swaps are occurring in the previous iteration , if there are no swaps ,then there is no point to go to next iteration and do this process again , instead of that we will terminate the process by checking this condition.
I had done 3 java courses and I still didn't get a lot of stuff. I thought I was quite dumb and not fit for it. But this course suddenly made a lot of things clear. I have been stuck in the same company for almost 3 years and now I think I'll be able to apply for jobs with confidence. Hats off to you for doing the unthinkable. I'll recommend everyone to go blindly for this course whether you're a noob or a pro.
This man deserve the highest award for his Nobel work...
Thanks a lot Kunal...
He has such a great oratory voice that puts an icing to the cake of his teaching.. Thank you so much Kunal❤❤
its actually midnight 3.00 am here..im going through your DSA courses here...but i never felt asleep for a single second ...you are an ammazing mentor 🤩🤩🤩🤩 ....and the way you describe it was crystal clear ....Thank you so much bro 😇😇😇
Believe me this is the best dsa playlist ever
BEFORE I USED TO HAVE A FEAR OF DSA TERM ONLY BUT NOW AFTER KUNAL STARTED TEACHING I FEEL IT MORE SIMPLER..THANK YOU
I learnt Bubble sort 1st time in class 11 and i was like : kya h ye....
my CS teacher to me: DSA is not everyone's cup of tea ☕ so , u have to remember it for your exams(ratta laga lo )..
Also me now : Hauaa bna rakha h😒🤦♂️
I am in relationship with DSA now😎💕
Yaaa samee!!!!
Hey Kunal!
It was an awesome lecture.
Just to clarify, I is running 5 time if you see it in your code. But according to theory it should run actually 5-1= 4 times. We are starting from zero. So actually it should be, i < arr.length -1; So loop is running one extra time.
Break is there to help it out obviously. But just for clarification if anyone has any doubt
Yep, the reason is that sometimes for code clarity such optimisations can be ignored. Also I mentioned we will discuss complexity in detail in time complexity lecture.
I also noticed it and wanted to check if any of the others did find it ..
completed and going ahead with full excitement.
My professor went over all type of sorts in like half an hour, I got basically zero knowledge from that lecture. Thank you Kunal for giving effort to create such a detailed lecture on bubble sort.
for the first time i understood bubble sort,i dont thin i will ever forget it now ....thanks kunal bhaiya
A friendly reminder 🙃
Please like this video...it might reach to a student who needs this because of your like.
So do the good work people.thanks
Free Quality Education at its best . Thank you Kunal for putting such a complex topic in very simplified manner . This channel is gonna break some records in time to come!!! God bless you with everything today and always !!!
Thanks Kunal, it is really great, i tried by reducing the first loop after every run because last element is anyway the largest in array.
// Here y is my array
for(int count=y.length;count >0; count--){
for (int i=0;iy[i+1]) {
int temp = y[i];
y[i] = y[i+1];
y[i+1] = temp;
}
}
}
The way Kunal bhaiya is explaining things is top-notch. Thankyou for this free DSA course ❤
Hey Kunal you are doing fantabulous job bro. I had completed my undergrad last year and I started dsa from last month for career advancement .Literally speaking the way you explain thing in simple way is awesome.
This was a really great explanation! It's amazing to see the teacher work soo hard and explain each and every minute details of the algorithm
Glad you enjoyed it!
@@KunalKushwaha Hey Kunal ! Please let us know when will you upload next video of this bootcamp.
30:16 for a second I thought how can someone take so long to add 1 + 2 + 3 + 4 lmao but then I got to know you were thinking something different. Anyways kudos to your efforts towards the community!
That entire calculation of time complexity got completely messed up. The reason lies with the mixing up of generic N and ignoring that N= 5 for that case. Otherwise, the calculation should be straight forward: N-1 + N-2 ......+ N-(N-1) = N(N-1)/2. Also, explaining a bit about the divide-and-conquer' approach as one of the main concepts in computational thinking should have saved a lot of time in the starting that went into explaining which looks more like hitting around a bush. kudos, Kunal!
Great work and explanation!
A small point: The reason explained for N^2 time complexity seems incorrect. The N^2 term seems to have a minus sign which suggests time taken would decrease with increasing N. However, if the 4 in the first term, i.e. 4N, is instead written as (N-1)*N (as N is 5 in the example taken), then N^2 will have a positive sign overall.
Also, for 1+2+3+4, it should be N(N-1)/2 assuming N=5.
Yes, you are right. It was only for this case, I didn't know how to explain before we cover complexity analysis. Hence, I'll cover complexity of each algorithm in that video.
Hey ! but for worst case Overall time complexity should be O(N^3) , on considering outer loop. You have considered only inner loop 31:20 as time complexity why?
@@aniketyadav6009 Same question comes into my mind i searched about it and come to know that outer loop is just iterating not taking any time (quite less which is ignorable) and most of the operations are being done in inner loop.
Already know this sorting but new thing i learnt is Stop When It is not Swapping for Particular Value of i.
Nice video🎉🎉
Very detailed video, in tears because got every bit of the video. nobody explained it this good. Keep doing the great work, Kunal.
that boolean check for no comparisons is what's called beautiful coding.
Thank you bhaiya for this amazing FREE course, getting lot of confidence when you are bursting all myth's around.
It's true there is no such quality content in the internet
#OPKUNALBHAIYA
Tomorrow I am going to explain all about bubble sort but before a day I want some confidence so that I saw the Kunal bubble sort video for the best explanation and that is amazing and after seeing this my confidence is like upper level(I am going to excite the class).
Man thank you for the free course i will surely like all the videos and comment too. Nowhere else in youtube this type of detailed course is found
Trust me guys its best course among all the paid DSA courses tqs kunal❤
Amazing video man! never ever algorithms seemed this interesting to me. You know how DSA is taught in unis and this is way better than that. I mean absolutely no comparison there. Keep up the good work!!
Im 2nd Year CSE btech but didnt knew about stable and unstable sorting algorithm before this video.Thanks for the info.
Generally I don't comment on videos ,but bro you absolutely nailed it !
Keep it up and keep it free as well .
The way you explained the time complexity is great for this sorting algorithm. Your videos are very detailed. Thanks a lot for the great content. I am hearing about stable and unstable sort for the first time, thanks a lot for explaining it with colors.
Simple ,to the point and even the code is small.Thank you for your efforts 🙌🙌
Very Nice explanation of all topics. Especially the questions you don't only solve it but also teach how to approach and how to think on our own. This is excellent teaching. Thank you very much.
You are beyond our expectation...Great Work brother...Thank you ...And I hope that I will master in this course within 3 months ...
I was struggling with sorting, and though this is a Java DSA playlist, I gave bubble sort a shot in my CPP code. Your explanation made it feel so easy, and I managed to code it without any trouble. Thanks a ton for providing such amazing free educational content. It really helped me out! Keep up the awesome work!
Like always Kunal, you've saved me the trouble of going through all the internet trying to grasp these concepts. Your approach to teaching makes it quite easy, thank you
Thanks for teaching us like no one did till now!! One small request, please make lectures on dynamic programming as well!!
The only video that fixes code for O(N) - Best Case complexity 🤯🙌🙌
thanks alot kunal , please complete the playlist soon
Noone can defeat you in teaching and explanation ways 😘
What a quality of content and teaching as well, thank you so much Kunal!❤💯
Best video of bubble sort on whole TH-cam is here! Thanks kunal bhaiya❤❤✨
Kunal, great job as usual. Thank you for passionately charitably investing your time, energy and resources to educate us.👏👏👏
when you talked about the boolean check, I was like amazed because every other person teaching bubble sort never talks about that. seriously that just 2-3 lines of code will have a big impact on time complexity when n is very big and array gets sorted before n^2 comparisions.
Best explanation on bubble sort. Thank you Kunal for the awesome work 👏👌
Glad you liked it
@@KunalKushwaha Your DSA playlist is excellent content I have found on the subject till date. I have not completed the entire playlist, but I can confidently say with the lectures so far I watched. Thanks again.
Though i know bubble sort I played a video and hence you proved that you will introduce new things in it..Great work brother
I just solved a medium-level question which was "binary search in 2D array" after watching this video.
One of the most knowledgeable and topics are so deeply explained !! in this video ..
Thank you Kunal for sharing such an optimised code for bubble sort.
@Kunal Kushwaha you are fab!!
Legendary explainations!! Thanks alot for efforts on this video!!! @KunalKushwaha
Before watching this video, I didn't know their something like stable or unstable sorting for bubble sort. Thanks kunal for such deep explanation. 😊❤
Most welcome 😊
Understood completely. Not even a single doubt.
36:48 it will be i < arr.length-1 actually, as we want to have (n-1) pass so [0,n-2] are n-1 passes/or value of i.
Thanks
Honestly saying , I start my DSA in c++ from a TH-cam channel(if you know , you know), literally I am getting scared when I think about DSA.
Now It's like..... 😂😂 You are GOD in Teaching KUNAL bhaiya . THANKS BRO..., I CAN'T EVEN TELL HOW MUCH I AM GRATE FULL TO YOU!!!
Microsoft didi ?
Same bruhh
@@PROTECHRAHUL 😂😂we are lucky bro.... We have teacher like Kunal 😁
@@raj_patel Inteligent!!!😂
@@arijitprasad7730 BRO KYOKI MERA STD 12 RIGHT NOW FINISH HUA AND MENE UNKA 1ST VIDEO DEKHA AND BANDH KAR DIYA DSA PADHNA HI
Haven't seen a detailed explanation on bubble sort in my life. My favorite part is the complexity analysis. @Kunal Kushwaha , you're proving again and again that this is the best DSA course. I'll say thank you for every video you're gonna post in future days.
Day by day i am falling in love with ur course❤
I saw some channels having heart attack at LinkedIn 😁
Kunal bhai you are rocking can't wait to start Ml and Web-D after DSA.
Lots of loves to you😍
Thank you for all the amazing lectures.
#bhaiyon_Mein_bhaiya_Kunal_bhaiya
Hey Kunal I tried to do DSA on my own multiple times but it's the farthest I have ever followed thanks for keeping me interested and dedicated 🙏🏼
Currently I am in the final year of my MCA and I found this playlist, if I would have found this earlier, my concept would have been lot more clearer, but I still decided to watch it, and with each and every video I am getting more and more excited, and learning a lot more thing with clarity. #dsa_god_kunal_kushwaha
Please make video on time and space complexity soon , i am the following the whole series got little bit idea want to know much abt it please make it soon ,more power to you :)
Sure I will
Yayyy, I always learn something new from you 🤗.
You are a true gem 💎
Please complete the rest of the topics🥺too. Ab final year mein aagye hai
And my tension is 📈
Where was this guy , hey Kunal I wish you were one year before, my Placements has started please wish me luck, trust me I have become fan of your teaching
You explained each and every concept in very detailed manner🤞🤞
Thank you for making it so easy for us.. it needs lot efforts behind at your end to deliver this quality content to us !
it's really great learning with you
great explanation as always, checkig with a boolean value to terminate if the loop was already sorted was a great idea
Glad it helped
Its by far very well structured course ever
I learnt new concept over sorted array and also time complexity part.
Amazing
following the course with patience
its awesome
hey Kunal !!!, first of all thank you so much for this playlist, I have doubt in the outer for loop isn't it "i
Great explanation and efforts. Thank you so much
Bubble sorting well explained in depth. Thanks Kunal ❤
I'm so grateful that i found your channel. Thank you so much !
No doubt by the time of completion of this series likes will be 100k+ and subscription 10M🥰🥰 thanks kunal for such selfless effort ...
oo bhai sahab ya to next level pa concept da rha ho bhiya aap to maza aa gya
Great vibes and explanation.
It is like something, that we always wanted,
Like someone teaching you by holding your hand💖
Thanks for explaining this swapped Boolean condition. Awesome.
Hi kunal sir
Sorry for distributing
But I want to appreciate your work
Your explanation is very cristal clear for me
Even your handwritten notes is very useful. That helped me very well
As you told they is no course like this.i felted that too.
Thank you very much
Ty
@@KunalKushwaha sir
I have a doubt can I ask you
Plz
Your explanation really makes the things so so clearer , thanku for teaching us so nicely ☺️👌
My favorite teacher😌😌😌kunal sir..!!!
Best DSA video i have ever seen...Great teaching skilll....
Glad you liked it
first time seeing someone talking about stability of sorting algo nice
Thank you kunal for making this playlist and putting your efforts
What a legend❤❤
thank you for your lots of effort to students and for the community class room your course is really better than the paid course
And now I am able to problems on leet code
I cannot express my gratitude in words for
you we are waiting for your more videos
Glad you like them!
Thanks Kunal for creating such a great content
I understood Bubble sort in one short
Grasped most of it. Thank you Kunal ❤
@kunal please do codility challenges also since those seems very tough some time comparing to others. Really love 💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕 your explanation. May god bless you 🙏🙏🙏
The typical inner loop condition is j < n-i-1 to avoid unnecessary comparisons with the last element of the sorted portion, as it is already in its correct place. However, if your code works with j
kunal your course is just amazing it helped me a lot why don't you complete the playlist please do it
Thank you Kunal for clear explanation.
I'm tired of thanking you again and again.
Thank you!😅
Is this course good for beginner?