< simple, slow>

Bubble sort

Insertion sort

Selection sort

 

<fast>

Quick sort

Merge sort

Heap sort

 

<O(N)>

Radix sort

============================================

 

Selection sort

 

▣ Bubble sort

 

 bubbleSort(A[ ]. n)   -> 배열 A[1....n]을 정렬한다.

   for last  <- n downto 2 {

        for i <- 1 to last-1 

            if (A[ i ] > A[ i + 1] ) then A[ i ] <-> A[ i  + 1];  >> 교환

'Algorithm' 카테고리의 다른 글

Least Recently Used  (0) 2022.06.23
버블정렬  (0) 2022.06.21
선택정렬  (0) 2022.06.19
응급실  (0) 2022.06.19
교육과정설계  (0) 2022.06.17

+ Recent posts