Skip to content

Sorting: bubble, selection, and insertion · ⁨排序:冒泡、选择与插入⁩

English

Putting an array in order

  • Sorting rearranges an array so the items go from smallest to largest.
  • We sort in place: we move items around inside the same array, with no return value.
  • Three classic methods do this: bubble, insertion, and selection sort.
中文

把数组排好序

  • 排序重新排列数组,让元素从小到大。
  • 我们就地排序:在同一个数组里把元素挪来挪去,没有返回值。
  • 三种经典方法都能做到:冒泡、插入、选择排序。

Handout

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

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