Recursion Flashcards

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/10

flashcard set

Earn XP

Description and Tags

Flashcards to review the concept of recursion in computer programming.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

11 Terms

1
New cards

Recursion

A programming technique where a function calls itself to solve smaller instances of the same problem.

2
New cards

Recursive Organization

Data structures such as subarrays, sublists, subtrees and subgraphs.

3
New cards

Repeated Logic

Using either iteration or recursion to traverse a set of values, or run the same piece of logic a given number of times.

4
New cards

Iterative function

A function that uses a loop to execute the same logic multiple times.

5
New cards

Recursive Function

A function that calls itself to execute the same logic multiple times.

6
New cards

Order of Execution

Determines when the logic is executed in a recursive function.

7
New cards

Iterative Advantages

Memory usage is controlled explicitly by the programmer, stack overflow is less likely and can execute more quickly.

8
New cards

Recursive Advantages

Naturally recursive functions are more concise, and languages with tail recursion provide performance benefits.

9
New cards

Singly-Recursive

A problem where you only need to have one self-call for each function call; generally easy to write iteratively.

10
New cards

Multiply-Recursive

Problems that require more than one self-call for each function call; generally harder to write iteratively.

11
New cards

Repeated-logic

Problems that the varying elegance of expression, and varying performance characteristics depend on to solve with either iterative or recursive form.