Break your own answer: edge cases and stress tests
Recursion and Dynamic Programming · Open board
Shows recursion as calls stacked on top of each other, each waiting for the one above it. This lesson breaks that stack on purpose, then rebuilds it by hand.
Before you start.Why the loop is right gave you the loop invariant, a sentence that stays true on every lap, and showed that tests on easy examples pass while boundary bugs hide. Recursion & Dynamic Programming gave you recursion, a function that calls itself on a smaller problem until a base case answers directly. Linked Lists, Stacks & Queues gave you the stack, where the last item in is the first one out, and the call stack, the list of calls that have started and not finished. Complexity & Big-O gave you the habit of counting steps as the input grows.
Lesson 13 of 96 in DSA
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.