Merge Sort Algorithm in Java - Full Tutorial with Source

preview_player
Показать описание
Coding the Merge Sort algorithm in Java with recursion! Can we sort 100,000,000, or even 1 billion ints?
This is a slightly more complex recursive Java coding lesson tutorial, where we'll use recursion to write our own implementation of VERY efficient Merge Sort sorting algorithm in Java.

Merge Sort is a fantastic sorting algorithm, a little more advanced but great algorithm for intermediate Java students to learn.

Learn or improve your Java by watching it being coded live!

Hey, I'm John! I'm a Lead Java Software Engineer who has been in the industry for more than a decade. I love sharing what I've learned over the years in a way that's understandable for all levels of Java developers.

Let me know what else you'd like to see!

Links to any stuff in this description are affiliate links, so if you buy a product through those links I may earn a small commission.

📕 THE best book to learn Java, Effective Java by Joshua Bloch

📕 One of my favorite programming books, Clean Code by Robert Martin

🎧 Or get the audio version of Clean Code for FREE here with an Audible free trial

🖥️Standing desk brand I use for recording (get a code for $30 off through this link!)

📹Phone I use for recording:

🎙️Microphone I use (classy, I know):

Donate with PayPal (Thank you so much!)

☕Complete Java course:

Рекомендации по теме
Комментарии
Автор

Perhaps the BEST explanation of Merge Sort out there. 👍🏻
The code along with variable names, justifies the natural thinking of the human mind.
Thanks a lot ❤️
Subscribed ✅
Best wishes and hope your channel gets all the love and support it deserves.

metdelta
Автор

This is pure gold! I wish you did a full Data structures&algorithms course, that would be awesome.

akosdanielbollok
Автор

I'm very weak in algorithms. From watching your video, the tutorial is very easy to understand. I understand how merge sort works. Thank you very much from the Vietnamese guy !

nguyencongthaisonkhcm
Автор

I watched and read neumors explanations about this but only after watching your video I was able to understand each line and now I can see it in my brain's eyes. I also dreamt about it. Thanks a lot! Please do more

moeal
Автор

I can't believe I've watched this entire video and without being bored. I can't even sit in class for 15 minutes without going to sleep and I'm literally watching this at 2:32am in bed.

mir.
Автор

I had to watch more than once to really absorb the info. It still is a lot less time and money than it costs me to listen to lectures at my university. Thank you for taking the time to make this video!

timjoyalle
Автор

I can't thank you enough for this clean explanation. I haven't been able to understand this algorithm until I stumbled on your video. Now I practically know what each line of code means. You're a genius!!

cr
Автор

I have to tell this, I've been trying to understand merge sort for quite a few days, and this video is the best I've found on YouTube! Thank you for explaining this in a very easy way!

davudazizov
Автор

Wow, the first explanation that made complete sense with 0 confusion.Thank you very much! Wish you were my teacher back in college lol

akshaypatel
Автор

I've been searching for a good explanation and a good clean code

but luckily !! i found both in one video
you're an amazing guy

elshaterhassansaber
Автор

This video is something else, I watched all the big channels before I got here, this explanation is by far the most detailed and the most accurate,
also providing an explanation for all the edge cases.
the implementation is super clear and clean.
this channel is underrated, I wish I knew this channel earlier.
thank you so much, you're the best!!

taldennis
Автор

Very informative video! Really could have used this back when I was in college lol. Also just attempted to run this with 1 billion elements and took about 8 and half minutes using C# for anyone who's curious!

AceNinja
Автор

Absolutely brilliant explanation! I was so confused for a school assignment on why the last two while loops exist in the code. Turns out it was just cleanup!

kosaken
Автор

Gave the link to this in the comments of every video I watched to understand merge sort because this is the best explanation of Merge sort. Thanks a lot man!!! Subscribed

sajanarora
Автор

John you did an awesome job in this video! You're the best course I could find on the merge sort algorithm. I really want to thank you from France for that. Keep up the good work :)

LTZMSYAL
Автор

Seriously I love the content you make, its made my learning much more better. You're so relaxed and calm about the way you explain your code. Good job!!

chrismendez
Автор

You do not know how much I looked around for a better explanation. You nailed it. Earned a new subbie.

Nerdymelreads
Автор

Hi Mr. John, I've seen so many videos on different algorithms of other people but your explanation is crystal clear and unique

sekharsamanta
Автор

I was so frustrated and sad about not understanding the merge sort. Your explnation is very clear, made my day. Thanks a lot! :)

Yersinia
Автор

Thanks! This makes SO MUCH MORE SENSE than other explanations!

J-wmss