What is Recursion?

Introduction

Recursion is a problem-solving strategy in which a function solves a problem by calling itself on a smaller version of that same problem. Instead of writing an explicit loop that repeats work, you describe the problem in terms of itself: a factorial of n is n times the factorial of n-1; the length of a list is one plus the length of the rest of the list. This self-referential way of thinking takes practice, which is why this topic focuses on the concept before we move into stack frames, tracing, and performance.

In COP3530, recursion matters because so many data structures are themselves recursive. A linked list is a node followed by another list; a tree is a node with subtrees. Once you are comfortable with recursive thinking, traversals, searches, and divide-and-conquer algorithms become much easier to express and reason about. Recursion is also the natural lead-in to understanding the call stack, which you will need for debugging and for recognizing why stack overflow happens.

As you watch these videos, look for three things. First, the two required pieces of any recursive function: a base case that stops the recursion and a recursive case that moves toward that base case. Second, how each presenter compares a recursive solution to an equivalent iterative one, and what they say about readability versus performance. Third, the vocabulary you will reuse all module long — base case, recursive call, stack, and divide and conquer.

Video 1: Introduction to recursion | Recursion series

WilliamFiset · 6:57 · 25,152 views · 3y ago · captions — Watch on YouTube

About this video

A concise introduction to recursion from WilliamFiset's dedicated recursion series. Based on its title and description, it defines what a recursive function is and breaks it into its required components, specifically the base case and the recursive call. Expect a focus on the structural anatomy of a recursive function rather than a single worked application.

Why this video

It maps directly onto the subtopics of defining recursion and the conceptual building blocks of a recursive function, and WilliamFiset is a well-regarded producer of algorithms and data structures material at exactly this level.

Video 2: Recursion Simply Explained with Code Examples - Python for Beginners

Python Simplified · 9:07 · 251,293 views · 4y ago · captions — Watch on YouTube

About this video

A beginner-friendly walkthrough of recursion with code examples, framed around the idea of dividing and conquering a problem into smaller pieces. The description indicates it also compares approaches in terms of speed, so expect some discussion of recursion versus an iterative alternative. Examples are shown in Python, but the logic transfers directly to the JavaScript you will write in this module.

Why this video

It covers both why recursion matters as a strategy and the recursion-versus-iteration comparison, and its clear, example-driven pacing makes it a good first exposure if the idea of a function calling itself still feels strange.

Video 3: What is Recursion? | Recursion Made Simple | Introduction to Recursive Methods | Geekific

Geekific · 9:16 · 4,762 views · 5y ago · captions — Watch on YouTube

About this video

Geekific's introduction to recursive methods, aimed at making the core idea simple and intuitive. Expect a definition of recursion, an explanation of how a recursive method is structured, and worked examples demonstrating the self-referential pattern in action.

Why this video

It reinforces the same conceptual foundation from a different angle, which helps the self-referential idea stick, and it keeps the framing at the introductory level this topic calls for.

How These Videos Support the Learning Outcomes

Together these videos build the conceptual base the rest of the module depends on. All three identify and explain the base case and the recursive case, which is the direct target of MO1 and the prerequisite for reasoning about infinite recursion. The code examples model the structure you will reproduce when implementing factorial, Fibonacci, and list traversal in JavaScript (MO2), and the discussion of how recursive calls break a problem into smaller subproblems prepares you to trace the call stack in the next topic (MO3). The recursion-versus-iteration comparisons, including the comments on relative speed, give you the starting criteria for choosing between the two approaches (MO4) and for recognizing that naive recursive solutions can carry real performance costs (MO5), which later material in this module examines in detail.

About These Videos

These videos were chosen from YouTube on October 2, 2026. Each has captions; the player turns them on. Videos on YouTube can be changed or removed — if one no longer plays, tell your instructor. If a player does not appear, use its Watch on YouTube link.