Skip to content · ⁨コンテンツへスキップ⁩

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.
日本語

2つの検索方法

  • 検索とは、配列内で値の位置を見つけること(あるいは存在しないことを告げること)です。
  • 線形検索は、すべての要素を1つずつ確認します。どんな配列でも機能します。
  • 二項検索は遥かに速いですが、まず配列がソート済みであることを要件とします。

Handout · ⁨プリント⁩

Log in or create account · ⁨ログインまたはアカウント作成⁩

IGCSE, A-Level & AP