Bubble Sort Algorithm
Автор: Sovila Srun
Загружено: 2026-01-09
Просмотров: 505
Welcome to the Data Structures and Algorithms course at the Faculty of Engineering, Royal University of Phnom Penh.
In this lecture, we dive into one of the fundamental sorting algorithms: The Bubble Sort. We will explore the concept of ordered arrays and why sorting is a critical preliminary step for efficient searching algorithms, such as Binary Search.
📝 In this lesson, we cover:
The Concept: Visualizing the sort using the "Baseball Team" height analogy.
The Logic: How the algorithm starts from the left, compares adjacent positions (0 and 1), and swaps them if the left player is taller.
The Process: Understanding "passes" and how the largest value "bubbles" to the right end of the array.
Implementation: A walk-through of the Bubble Sort code in C/C++.
Efficiency: Calculating the Big-O notation and understanding why Bubble Sort runs in $O(n^2) time.
#DataStructures #Algorithms #BubbleSort #CPP #Programming #RUPP #Engineering #ComputerScience #SortingAlgorithms
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: