Skip to content

Sorting: selection and insertion sort · ⁨排序:选择排序与插入排序⁩

English

Putting an array in order

  • Sorting means putting the values of an array in order, usually from small to large.
  • On the AP CSA exam you must be able to write and trace two sorts: selection sort and insertion sort.
  • You also need to trace (but not write) a third sort: merge sort. We look at all three here.
中文

把数组排好顺序

  • 排序(sorting)就是把数组里的值排好顺序,通常是从小到大。
  • 在 AP CSA 考试中,你必须会写和追踪两种排序:选择排序(selection sort)和插入排序(insertion sort)。
  • 你还需要会追踪(但不用会写)第三种排序:归并排序(merge sort)。这三种我们都会看。

Handout

Log in or create account · ⁨登录或创建账户⁩

IGCSE, A-Level · ⁨IGCSE、A-Level⁩ & AP · ⁨与 AP⁩