Bubble Sort (Algorithm /Code/Program)

preview_player
Показать описание
Given an array , sort the array using Bubble sort.
Рекомендации по теме
Комментарии
Автор

No need to go till end again and again. In the inner loop, the condition should be i <n-p-1.

rahulkhandelwal
Автор

i ve gott 10+ in my exam. thank u bhai😘

cristianbls
Автор

inner loop index should end when: i < n-p-1

jamesqiu
Автор

Hello Sir, Big fan of your work. I didn't check the source code on github, but the swap(i, i+1) wasn't supposed to be swap(a[i], a[i+1]), because we're supposed to swap the values at certain index, not the index, right?

stefanioan
Автор

Your explanation techniques are awesome

kavitadas
Автор

Bro u deserve Million Subscribers...Such a Great Explanation

usamaalioffical
Автор

good explanation sir, thank you so much 👍👍

SmartProgramming
Автор

We can also reverse the array after the last step to sort in descending order

RidiculousTech
Автор

You mentioned with each comparison with other element it is called bubble sort (that drawing) but the actual answer is after each iteration the lighter element comes to top as bubble eg: water bubble coming water on top. Please refer any other video or any foreign author. The name in the algorithm only mentions "BUBBLE", i hope you got it. Kindly change.

ankit
Автор

Sir i have one doubt, if you are setting pass initially from 0, then in the diagram it should be starting from pass 0, but you wrote it from pass 1, my doubt is should we start from pass 1, or pass 0

kalyanachakravarthi
Автор

Sir aapne Jo pass ka forloop Liya h na vahapy pass equal to zero kyu Liya h, ye explain karo na plz, vaha py pass=1 Liya tuo chalega kya aap pass tuo 1 se iteration karaheho .thodasa confusion hora .

neharenge
Автор

Wonderful explanation of all the videos watched so far. Can you please post few videos on explaining doubly linkedList(Insert, delete, search, reverse)

javerianasir
Автор

Great lectures sir keep it up, it's helping me a lot

nimitvanawat
Автор

Another brilliant explanation. I thought it was called a bubble sort because larger (or smaller) values rise to the "top" of the array like bubbles rising in a column of water. Either way, with O(n^2) it's not very useful.

duncanphillipgreen
Автор

Very nice explanation sir thank you. The code you listed at the right is it the pseudo code?

josilabhantoa
Автор

u are genius teacher, thank u for your video!!andie habesha

aragawabraraw
Автор

Pls what if we have negative values among

abdulsaburabubakarsaidu
Автор

Sir my engineering student Friend suggest me your video nice explanation thanku very much

mrgarg
Автор

Please upload concepts and program on java

misterteluguabbayi
Автор

Sir program bi krwa kry phr bi sumja a jati hai ap dryrun sumja dyty hai.

tyabali
join shbcf.ru