Standard algorithms
導入済み
9:16
プログラム開発ライフサイクル
スマホのすべてのアプリは、このような人が書いたものです。しかし彼らはコードを書くことから始めました。最初の行の前に、問題は研究され、解決策…
英語のナレーション・英語と中国語の字幕を切り替え可能
このレッスンの内容
| English | 意味 |
|---|---|
| algorithms/ˈælɡərɪθəmz/ | A finite sequence of precise steps for solving a problem or carrying out a task. |
| linear search/ˈlɪnɪə sɜːtʃ/ | 線形探索 |
| bubble sort/ˈbʌbl sɔːt/ | バブルソート |
| counting/ˈkaʊntɪŋ/ | 数 |
| totalling/ˈtəʊtəlɪŋ/ | 累加 |
| value/ˈvæljuː/ | An amount, number or item assigned to a variable or expression, or held by a data object. |
| list/lɪst/ | |
| sorting/ˈsɔːtɪŋ/ | |
| max/min | |
| average/ˈævrɪdʒ/ | |
| loop/luːp/ | A structure that repeats a sequence of instructions. |
| pass/pæs/ | |
| ascending order |
古典的なレシピ
- いくつかの標準的なアルゴリズムが繰り返し登場します。
- リニアサーチ、バブルソート、およびカウント/合計パターンの知識が必要です。
- それぞれは短いですが、即座に識別できる価値があります。
線形探索(Linear Search)
DECLARE Found : BOOLEAN
Found ← FALSE
FOR I ← 1 TO 10
IF List[I] = SearchValue
THEN
Found ← TRUE
ENDIF
NEXT I
OUTPUT Found
- リニアサーチは最初から順に各項目をチェックし、値が見つかるかリストの終わりまで到達するまで続けます。
- どのリストでも機能します — ソートは不要です。

標準シンボル(開始/終了、入力/出力、処理、判断)を使用した合計アルゴリズムのフローチャートです。

Standard algorithms
compare adjacent, swap if needed
Step through a bubble sort — compare neighbours and swap until everything is in order.
A linear search finds a value by:
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
Linear search examines items one by one until it finds the value or reaches the end.
このカードは修正されたため、翻訳が更新されるまで英語で表示されます。
Bubble sort
FOR Pass ← 1 TO 9
FOR I ← 0 TO 8
IF List[I] > List[I + 1]
THEN
Temp ← List[I]
List[I] ← List[I + 1]
List[I + 1] ← Temp
ENDIF
NEXT I
NEXT Pass
- A bubble sort 冒泡排序 compares each side-by-side pair and swaps them if they are out of order.
- It repeats this until no more swaps are needed — leaving the list sorted.

A bubble sort puts a list in order by:
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
It swaps out-of-order neighbours and repeats passes until no swaps are needed.
合計、カウント、最大/最小/平均
- 合計 — 累計を維持します:
Total ← Total + Value。 - カウント — 何かが発生するたびに1を加算します:
Count ← Count + 1。 - 最大/最小 — 現在見た中で最大/最小の値を維持します。
- 平均 — 合計を値の数で割ります。

Which line adds a value to a running total?
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
Total ← Total + Value accumulates a sum; Count ← Count + 1 counts occurrences.
Match each standard algorithm to how it works.
難易度 2/5 · 140 コイン + 今日初回達成時の小ボーナス
These four — search, sort, total and max — are the building blocks of most exam algorithms.
Using totalling on the list [2, 4, 6, 8], what is the final total?
難易度 2/5 · 140 コイン + 今日初回達成時の小ボーナス
2 + 4 + 6 + 8 = 20.
理解できましたか
- リニアサーチは順に各項目をチェックします(どのリストでも機能)
- バブルソートは順序の異なる隣接値を交換し、ソートされるまで繰り返します
- 合計 (
Total ← Total + Value) と カウント (Count ← Count + 1) - max/min = 現在までの最良値を維持; average = 合計 ÷ カウント
A linear search looks for 7 in the list 4 9 2 7 5. How many items does it compare before it finds 7, including 7 itself?
難易度 2/5 · 140 コイン + 今日初回達成時の小ボーナス
It checks 4, 9, 2, then 7: four comparisons.
A program has totalled 5 marks to get 340. What is the average?
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
Average = total ÷ count = 340 ÷ 5 = 68.
このカードは新しいため、翻訳ができるまで英語で表示されます。
You've got it
- linear search checks each item in turn (works on any list)
- bubble sort swaps out-of-order neighbours, repeating until sorted
- totalling (
Total ← Total + Value) and counting (Count ← Count + 1) - max/min 最大值/最小值 = keep the best so far; average = total ÷ count
何が問題でしたか?この内容はサイトの運営チームだけが確認します。