Sorting In Python : Bubble Sorting - Python Programming Tutorials - Coding Area

Опубликовано: 11 Октябрь 2024
на канале: Coding Area ✓
230
38

Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.

Approach
1.Starting with the first element(index = 0), compare the current element with the next element of the array.

2.If the current element is greater than the next element of the array, swap them.

3.If the current element is less than the next element, move to the next element.

Subscribe For More : https://rb.gy/gczd7o
Hit The Like Button
What You Want Next Let Me Know In The Comment Section
Stay Tuned For Further Videos
#python #bubblesort #sorting #codingarea

Disclaimer
--------------------------------------------------------------------------------------------------------------------
Video is for educational purpose only. Copyright Disclaimer Under Section 107 of the Copyright Act 1976, allowance is made for "fair use" for purposes such as criticism, comment, news reporting, teaching, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing. Non-profit, educational or personal use tips the balance in favor of fair use.