Recursion
- Terminology, usage, base case and recursive case, infinite loop - Finish Fibonacci sequence - Recursive search to determine if a word is a palindromes. Extra help Wednesday - 2/26/20 Begin Discussion on Big O notation. Searching and Sorting. Discussion - Linear search vs binary search. Begin Binary search program. Emphasis on arrays, 2D-arrays, ArrayLists, Strings. Know the methods and syntax!!!!
Recursive programs - Assignment - Fibonacci Sequence
Fibonacci sequence - the value of the next term in the sequence is the sum of the two previous terms. The first two terms are 1 and 1. 1,1,2,3,5,8,13,21,34, etc. Students will write a program that asks the user to input the number of terms they want to see printed for the fibonacci sequence. The main will call two methods to calculate and print the terms of the sequence. The first method will print the terms out using a loop. The second method will print the terms out using a recursive method. Hint - you need 2 base cases for the recursive method. More Arraylists - syntax, usage, methods. Assignment - Dice Again using Arraylists. |