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