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 |
고전적인 알고리즘 패턴
- 몇 가지 표준 알고리즘이 반복적으로 나타납니다.
- 선형 탐색, 버블 정렬, 세기/합계 계산 패턴을 반드시 알아야 합니다.
- 각각 짧지만 즉시 식별할 가치가 있습니다.
선형 탐색
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.
합계, 세기, 최대/최소/평균
- 합계(Totalling) — 누적 합계를 유지:
Total ← Total + Value. - 세기(Counting) — 사건이 발생할 때마다 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.
이해했습니다
- 선형 탐색은 각 항목을 순차적으로 확인 (어떤 목록에도 적용 가능)
- bubble sort swaps out-of-order neighbours, repeating until sorted
- 합계 (
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
어떤 문제가 있었나요? 사이트 팀만 이 내용을 볼 수 있습니다.