Skip to content · ⁨コンテンツへスキップ⁩

Bubble sort · ⁨バブルソート⁩

English

Bubble sort

Sort an array into ascending order in place using bubble sort: walk through the array comparing each pair of neighbours and swapping them if they're in the wrong order. After each full pass the largest remaining value has "bubbled" to the end, so repeat until everything is sorted.

日本語

バブルソート

バブルソートを使ってアレイをインプレイで昇順にソートします。アレイを走査して隣り合うペアを比較し、順序が逆なら交換します。各完全なパス後、残りの最大の値が「泡」のように最後尾に移動するため、すべてソートされるまで繰り返します。

Log in or create account · ⁨ログインまたはアカウント作成⁩

IGCSE, A-Level & AP