文章列表
insertion sorting:
Insertion sort is an efficient algorithm for sorting a small number of
elements. Insertion sort works the way many people sort a hand of playing cards
INSERTION-SORT(A)
1 for j ← 2 to length[A]
2 do key ← A[j]
3 ▹ Insert A[j] into the sorted sequence A[1 j - 1].
4 ...
- 2007-07-10 17:31
- 浏览 737
- 评论(0)
什么是算法:
Informally, an algorithm is any well-defined computational procedure that takes some value,
or set of values, as input and produces some value, or set of values, as output. An algorithm is
thus a sequence of computational steps that transform the input into the output.
We can also view an a ...
- 2007-07-10 16:20
- 浏览 807
- 评论(0)