RUVIDEO
Поделитесь видео 🙏

What is the Bubble Sort? - Java Algorithms Tutorial

What is the Bubble Sort? is a free tutorial by Jonathan Rasmusson from Java Algorithms course
Link to this course(Special Discount):
https://www.udemy.com/course/data-structures-and-algorithms-bootcamp/?ranMID=39197&ranEAID=Gw%2FETjJoU9M&ranSiteID=Gw_ETjJoU9M-KjSceRahSfGmWxWCAPYngA&LSNPUBID=Gw%2FETjJoU9M&utm_source=aff-campaign&utm_medium=udemyads
This is the best Java Algorithms Course
Course summary:
How to answer commonly asked Silicon Valley style interview questions
Demonstrate knowledge and mastery of data structures and algorithms
How to pass Silicon Valley style technical interviews
Interview confidently
Land your dream job
English
Now Senator you're here at Google and I like to think of the presidency as a job interview. Now it's hard to get a job as president and you're going to do it now it's also hard to get a job at Google. We have questions and we ask our candidates questions. And this one is from Larry Schwimmer. What do you guys think I'm kidding, it's right here. What is the most efficient way to sort a million 32 bit integers? It may seem hypothetical but yes Google does ask these types of questions as you just saw in interviews. And in this section we're going to go over the top three sorting algorithms you'll need to know for your interview if you ever want to interview with someone like Google. Here we're going to cover the bubble sort, the merge sort, and the granddaddy of them all, the quicksort. Let's jump in to the simplest one of them all first the bubble sort. Bubbles was kind of a neat sorting algorithm because what it does is really finds the highest number in the array through several passes and it keeps bubbling it up. Take a look at this example here if got five four three two one. This is not sort of this is an exact opposite order. We want to actually want that five in the right hand side. And let's just apply the bubble sort algorithm and see how that works here. What we do is we start at the very bottom of our group without five and the four. What do is we're going to start with a five in the four and we're going to comparatively compare the five with each number and kind of bubble it up. So first we'll compare five of four five is greater than four so we'll swap then we'll compare five with three five is greater than three then we'll swap and we'll compare five with two. Five is greater than two then we'll swap. And finally we get to the very end. Five is greater than one. So we will swap and then we lock in that five at the very end. And that is one pass through the bubble sort. Now we are effectively locked in. We're guaranteed to have the highest number on the right hand side here. Now we just repeat the process with the remaining numbers. So now we've got four three two one and we start again. We go four compared to three. That's bigger. Swap. Four compared to two. It's bigger. Swap. Four compared to one that's bigger swap. And we lock in the four. Now we've got the four in the five and we just repeat this process again. We're left with three to one and we just repeat three to two swap three to one swap. Now we've locked in the three then we're left with two and one two to one swap and then we finally have our sorted array. So that's bubble sort. It's just progressively taking the highest number it can find in the array and bubbling up to the top and locking it in. Next let's see what it looks like in code.
What is the Bubble Sort? How to ace your Silicon Valley style coding interview

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «What is the Bubble Sort? - Java Algorithms Tutorial», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.