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.

한국어

버블 정렬

버블 정렬(bubble sort)을 사용하여 배열을 제자리에서 오름차순으로 정렬합니다: 배열 전체를 순회하며 각 이웃 쌍을 비교하고 순서가 잘못되면交换합니다. 완전한 pass마다 남은 가장 큰 값이 "버블"되어 맨 끝으로 이동하므로, 모든 것이 정렬될 때까지 반복합니다.

Log in or create account · ⁨로그인 또는 계정 만들기⁩

IGCSE, A-Level & AP