1/14
These flashcards cover key vocabulary and concepts related to recursion from the study guide.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Recursion
The process of solving a problem by solving smaller instances of the same problem.
Recursive method
A method that calls itself as part of its own execution.
Base case
The condition in a recursive algorithm that can be solved directly, without further recursion. Stops the chain.
Recursive case
The part of a recursive algorithm that reduces the problem to a smaller version and calls the method again.
Depth of recursion
The number of times a recursive method calls itself, not counting the original call.
Overhead
The extra work (memory allocation, storing return addresses) associated with each method call.
Factorial (n!)
The product of all positive integers up to n. Defined as: 0! = 1 and n! = n × (n−1)! for n > 0.
Fibonacci series
A sequence where each number is the sum of the two preceding numbers: 0, 1, 1, 2, 3, 5, 8, …
Directory
A folder in a file system that can contain files and other directories (subdirectories).
File object
A Java object representing either a file or a directory in the file system.
listFiles()
Java method that returns an array of File objects for the contents of a directory.
list()
Java method that returns an array of String names for the contents of a directory.
DFS (Depth-First Search)
A traversal strategy that goes as deep as possible into one branch before backtracking to explore others. Naturally implemented with recursion.
BFS (Breadth-First Search)
A traversal strategy that visits all nodes at the current depth level before moving to the next level. Requires a queue data structure.
Iterative algorithm
An algorithm that uses loops (for, while) to repeat operations, as opposed to recursion.