1/18
Vocabulary practice flashcards covering recursion fundamentals, call stack operations, iterative vs. recursive trade-offs, complexity analysis, and binary search implementation details from Lesson 07.
Recursion
A problem-solving technique where a function solves a problem by calling itself with smaller versions of the same problem.
Base Case
The condition in a recursive algorithm that stops recursion and prevents infinite execution.
Recursive Case
The part of a recursive function where it calls itself with a smaller or simpler subproblem to make progress toward the base case.
Call Stack
The internal data structure used during program execution to keep track of active function calls, parameters, local variables, and return addresses.
Recursive Factorial
A mathematical function on non-negative integers defined recursively as n!=n×(n−1)!, with the base case 0!=1.
Complexity of Recursive Factorial
An algorithm that takes O(n) time and O(n) auxiliary space because each recursive call must be stored in the call stack.
Complexity of Iterative Factorial
An algorithm that takes O(n) time and O(1) auxiliary space because it uses loop control variables with minimal call stack usage.

Overlapping Subproblems in Recursive Fibonacci
A property of naive recursive Fibonacci where identical function calls are computed repeatedly across different branches, resulting in an exponential time complexity of approximately O(2n).
Complexity of Naive Recursive Fibonacci
An implementation that has a time complexity of approximately O(2n) due to repeated calculations and a space complexity of O(n) proportional to the deepest chain of recursive calls.
Complexity of Iterative Fibonacci
An iterative approach that executes in O(n) time and requires O(1) auxiliary space.
Common Recursion Errors
Flaws in recursive programming that lead to infinite recursion or crashes: having no base case, never reaching the base case, or failing to make correct recursive progress toward the base case.
Linear Search
A sequential search algorithm that checks elements one by one from beginning to end, with a worst-case time complexity of O(n).
Binary Search
A search algorithm operating on sorted data that repeatedly compares the target with the middle element and discards half of the search space at each step.
Sorted Data Precondition
The requirement that an array must be ordered for binary search to work, ensuring the algorithm can safely discard one half of the elements based on the middle comparison.
Midpoint Formula (Binary Search)
The index calculation given by mid=(low+high)//2 used to find the center index between bounds low and high.
Base Case of Recursive Binary Search
The condition low>high, which signifies that the target element is absent from the array and returns −1.
Time Complexity of Binary Search
O(log(n)) in both worst and average cases, derived from halving the search space at each step until n/2k=1, which yields k=log2(n).
Auxiliary Space of Binary Search (Iterative vs. Recursive)
Iterative binary search requires O(1) auxiliary space, whereas recursive binary search requires O(log(n)) auxiliary space due to call stack frames.
Divide-and-Conquer
An algorithmic paradigm that breaks a problem down into smaller subproblems of the same type, solves them, and combines the solutions, as seen in Binary Search, Merge Sort, and Quick Sort.