跳到主要内容

Searching: linear and binary

English

Two ways to search

  • Searching means finding where a value is in an array (or saying it is not there).
  • Linear search checks every item one by one. It works on any array.
  • Binary search is much faster but needs the array to be sorted first.

讲义

登录或创建账户

IGCSE, A-Level & AP