Bubble Sort Algorithm - Theory + Code

preview_player
Показать описание
This is the first video in the sorting algorithm series where we cover bubble sort in depth. We look at how the algorithm works, the complexity analysis, optimisation, and code.

Take part in the learning in public initiative! Share your learnings on LinkedIn and Twitter with #DSAwithKunal & don't forget to tag us!

👉 Resources

=========================================
Timestamps:
0:00 Introduction
1:06 Bubble Sort
5:03 Why Bubble Sort?
8:22 Others Names of Bubble Sort
17:14 Complexity of Bubble Sort
18:04 Space Complexity
19:10 Time Complexity
21:55 Best Case
25:17 Check time complexity video for general answer
32:12 Stable and Unstable Sorting Algorithm
36:03 Code for Bubble Sort
46:06 Outro

#sorting #placement #dsa #interviews
Рекомендации по теме
Комментарии
Автор

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 <3

StoryGicRohit
Автор

I saw many videos on YouTube 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.

Rishabhsharma-oudl
Автор

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!

sadmansakibrabbani
Автор

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.

Coding-Mind
Автор

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.

arnabdan
Автор

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!!❤️

srushtipatil
Автор

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.

Scorpio
Автор

BEFORE I USED TO HAVE A FEAR OF DSA TERM ONLY BUT NOW AFTER KUNAL STARTED TEACHING I FEEL IT MORE SIMPLER..THANK YOU

abhisekhkumarjha
Автор

Believe me this is the best dsa playlist ever

Content_creater_entertainment
Автор

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 😇😇😇

mohank
Автор

This man deserve the highest award for his Nobel work...
Thanks a lot Kunal...

AmitGupta-zjgq
Автор

completed and going ahead with full excitement.

dimplechauhan
Автор

He has such a great oratory voice that puts an icing to the cake of his teaching.. Thank you so much Kunal❤❤

hrithikshaw
Автор

for the first time i understood bubble sort, i dont thin i will ever forget it now ....thanks kunal bhaiya

varshneytiwari
Автор

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

moneebk
Автор

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

gouravmohanty
Автор

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!

yodude
Автор

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.

pankajmalhotra
Автор

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 !!!

singhamita
Автор

Very detailed video, in tears because got every bit of the video. nobody explained it this good. Keep doing the great work, Kunal.

lostt