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

Array algorithms: max, count, search, average · ⁨配列アルゴリズム:最大値、カウント、検索、平均⁩

English

Four classic array jobs

  • Most array work is one of four scans: find the maximum, count matches, search for a value, or take an average.
  • Each one is a single for loop over the array, with a variable that remembers something.
  • Once you know these four, most array problems are a small change to one of them.
日本語

4つの古典的な配列タスク

  • ほとんどの配列操作は4つのスキャンのいずれかです:最大値の探索、一致のカウント、値の検索、または平均値の取得。
  • 各タスクは、配列全体を一度だけ巡る単一のforループであり、何かを記憶する変数を使います。
  • これら4つを知れば、ほとんどの配列問題はそれらのいずれかの小さな変形になります。

Handout · ⁨プリント⁩

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

IGCSE, A-Level & AP