Загрузка...

Bubble Sort Algorithm Visualized | Step by Step

Bubble sort — see how a simple idea of comparing neighbors gradually turns a jumbled array into a perfectly ordered sequence.

This animation explains the bubble sort algorithm from scratch. You will see how each pass walks through the array, compares adjacent elements, and swaps them whenever they are in the wrong order. With every complete pass the largest remaining value bubbles up to its final position, and the sorted part of the array — shown in green — grows from the right. The algorithm keeps going until one full pass happens without a single swap, which is the moment the array is guaranteed to be sorted. At the end we show the total number of comparisons, the number of swaps, and the time complexity O(n²) that defines bubble sort. The second part of the video is a high-speed showcase of the same algorithm running on 100 random values.

If you enjoyed the video, subscribe 🔔 so you don't miss more algorithm visualizations!

⏱ CONTENTS:
0:00 Introduction
0:08 Sorting 10 elements — step by step
2:49 Final pass with no swaps
3:17 Statistics & time complexity O(n²)
3:23 Showcase on 100 elements

#bubblesort #sortingalgorithm #algorithm #manim #computerscience #programming #coding

Видео Bubble Sort Algorithm Visualized | Step by Step канала Prof. Numiko
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять