Wang Fu Egypt

🔍 Searching and sorting

Unit 2 · Programming building blocks · 10 min

Linear search checks items one by one, up to n steps. If the list is sorted, binary search halves it each step: about 10 steps for 1,000 items. Sorting algorithms (e.g. bubble sort) arrange items by value.

Words in this lesson

  • 搜索 (sōu suǒ) — search
  • 排序 (pái xù) — sorting
  • 算法 (suàn fǎ) — algorithm

Project: Bubble-sort 8 numbered cards by hand and count the swaps.

Back to track · Learn

埃中王府
Wang Fu Egypt
加载中…