2016年2月29日 星期一

[C] Insertion Sort

  • 原理 : 將資料逐一插入以排序好的序列中
  • Algorithm : 
                    for i <- 2 to n do
                                     將a[i] 插入 a[1] ~ a[i-1] 之間適當的位置,使a[1]~a[i]排好

  • Code :
from : https://study.cs50.net/insertion_sort


沒有留言:

張貼留言