Перейти к содержанию

Рекурсия

Введено
Раздаточный материал
Видеоурок по этой теме Открыть страницу видео
15:34

Поиск и сортировка

Телефонная книга на миллион имен. Если проверять их по одному, можно совершить миллион сравнений. Но вы уже знаете секрет: откройте её посередине…

Озвучивание на английском · переключаемые субтитры на английском и китайском языках

В этом уроке

Видеоурок
Словарь
English Значение
recursive/rɪˈkɜːsɪv/рекурсивный
loop/luːp/A structure that repeats a sequence of instructions.
base case/beɪs keɪs/базовый случай
recursive case/rɪˈkɜːsɪv keɪs/рекурсивный случай
recursive call/rɪˈkɜːsɪv kɔːl/A function call made by the same function while it is running.
trace/treɪs/To follow an algorithm step by step and record its values.
call stack/kɔːl stæk/стек вызовов
recursion/rɪˈkɜːʃn/The use of a rule inside its own definition to express repetition.
function/ˈfʌŋkʃn/A mapping that assigns exactly one output to each allowed input.
Winding upThe stage when recursive calls are made until a base case is reached.
UnwindingThe stage when recursive calls return their results to the calls waiting for them.
stack/stæk/A last-in, first-out data structure in which items are added and removed at the same end.
parameters/pəˈræmɪtəz/Values that specify a model or function, or named inputs that a subroutine receives.
local variables/ˈləʊkl ˈveərɪəblz/A variable whose name is accessible only within a particular function, block or other limited scope.
stack frame/stæk freɪm/кадр стека
return address/rɪˈtɜːn əˈdres/The location where execution should resume after a called routine finishes, saved as part of managing the call.
pushedAdded to the top of the call stack when a function is called.
poppedRemoved from the top of the call stack when a function returns.
ADTA description of data and its allowed operations, separate from how it is stored.
memory/ˈmeməri/The part of a computer that holds data and programs currently in use.
stack overflow/stæk ˌəʊvəˈfləʊ/переполнение стека
Deep recursionEven a correct recursion of a million levels needs a million frames, so it can exhaust memory where a loop would use none.
FibonacciA sequence starting with zero and one, where each later number is the sum of the previous two.
memoisation/ˌmeməʊaɪˈzeɪʃn/мемоизация
iteration/ˌɪtəˈreɪʃn/Repeating a sequence of instructions or calculations.
self-similarDescribes a problem that contains a smaller version of itself.
tree traversalThe process of visiting each node in a tree in a particular order.
divide and conquer/dɪˈvaɪd ænd ˈkɒŋkə/A method that divides a problem into smaller problems and combines their solutions.
binary search/ˈbaɪnəri sɜːtʃ/A search of ordered data that repeatedly compares with the middle item and discards half of the remaining search range.
merge sort/mɜːdʒ sɔːt/A sorting algorithm that divides data into smaller parts, sorts them, and joins them in order.
arithmetic overflowA result that is too large or small for the available number of bits.
infinite recursionWhen a function keeps calling itself because it never reaches a stopping point.

Раздаточный материал

IGCSE, A-Level & AP