Recursion 1
From Huben's Wiki
Line 8: | Line 8: | ||
* Do Handout 1: Sierpinski's Triangle | * Do Handout 1: Sierpinski's Triangle | ||
+ | |||
+ | Count M&M's 2 ways exercise. | ||
Recursive methods generally have 4 parts (though some are often vestigial or combined): | Recursive methods generally have 4 parts (though some are often vestigial or combined): | ||
Line 17: | Line 19: | ||
* How do these parts apply to the Sierpinski's Triangle exercise? | * How do these parts apply to the Sierpinski's Triangle exercise? | ||
+ | * How do these parts apply to the count M&M's exercise? | ||
Handout 2: Describing Recursive methods | Handout 2: Describing Recursive methods | ||
Line 26: | Line 29: | ||
# Underline the recursive call. | # Underline the recursive call. | ||
# Draw arrows to where the results are combined and returned. | # Draw arrows to where the results are combined and returned. | ||
− | |||
− | |||
− | |||
− | |||
− |