Description: Introduction to the fundamentals of recursion, which is an essential technique to have in consideration when we need to break a problem into smaller subproblems by applying the same algorithm to solve the smaller subproblems.
Description: Introduction to the fundamentals of recursion, printing a series of numbers in reverse order. A translation from regular loop to a recursive-based method
ACM CCECC
N/A
AP CS A
[Recursive Methods]
CON-2.O Determine the result of executing recursive methods
CON-2.O.1 A recursive method is a method that calls itself.
CS2
[Solving Problems with Recursion]
130.422.c.4.f Identify, trace, and appropriately use recursion in programming solutions, including algebraic computations;
130.422.c.4.l Develop algorithms to solve various problems, including factoring, summing a series, finding the roots of a quadratic equation, and generating Fibonacci numbers;
Description: [From Iterative to Recursive]. In this session, we showcase a formula to transform an interative algorithm into a recursive one by applying the Russian Dolls methodology.
Code:
ACM CCECC
[Solving Problems with Recursion]
DS-19. Solve a variety of basic recurrence relations.
DS-20. Analyze a problem to determine underlying recurrence relations.
SDF-09. Create a simple program that uses recursion
AP CS A
[Recursive Methods]
CON-2.O.2 Recursive methods contain at least one base case, which halts the recursion, and at least one recursive call.
CON-2.O.3 Each recursive call has its own set of local variables, including the formal parameters.
CON-2.O.4 Parameter values capture the progress of a recursive process, much like loop control variable values capture the progress of a loop.
[Solving Problems with Recursion]
CON-2.O.5 Any recursive solution can be replicated through the use of an iterative approach. EXCLUSION STATEMENT(EK CON-2.O.5)—Writing recursive program code is outside the scope of the course and AP Exam.
CS2
N/A
ACM CCECC
N/A
AP CS A
[Solving Problems with Recursion]
CON-2.O.6 Recursion can be used to traverse String, array, and ArrayList objects.
CON-2.P Apply recursive search algorithms to information in String, 1D array, or ArrayList objects.
CS2
N/A
Description: In this session, we use recursion to calculate the Fibonacci number correspondent to a certain index in the sequence.
Code:
Recursion1.java
ACM CCECC
[Recursive Methods]
DS-15. Apply counting arguments, including sum and product rules, inclusion-exclusion principle, and arithmetic/geometric progressions. [ACM]
DS-17. Calculate permutations and combinations of a set, and interpret the meaning in the context of the particular application.
AP CS A
N/A
CS2
[Solving Problems with Recursion]
130.422.c.4.l Develop algorithms to solve various problems, including factoring, summing a series, finding the roots of a quadratic equation, and generating Fibonacci numbers;