Problem Solving
0 of 21 lessons complete0%
Approaching a Problem
8 lessons- Restate the problemrestating the problem
- Pin the input and outputthe input–output contract
- Trace a worked examplethe worked example
- Break the problem into stepsdecomposition
- Solve a simpler case firstsimplifying the input
- Recognise a pattern you knowpattern recognition
- Check the edgesedge cases
- Plan before you codeplanning before coding
Recursion
13 lessons- What recursion isrecursion
- Stop the recursionthe base case
- What the call stack doesthe call stack
- Recurse once per itemlinear recursion
- Reverse a word, one letter at a timerecursion over a string
- Open boxes inside boxesrecursion over nested arrays
- Count every foldertree recursion
- Split the search in halfdivide and conquer
- Try a path, then back outbacktracking
- Take turnsmutual recursion
- Carry the answer with youtail recursion
- When to loop insteadrecursion versus iteration
- Write the answers downmemoised recursion