/*
 * Creator: Nighthawk Coding Society
 * Mini Lab Name: Fibonacci sequence, featuring a Stream Algorithm
 * 
 */

import java.util.ArrayList;  
import java.util.HashMap;
import java.util.stream.Stream;

/* Objective will require changing to abstract class with one or more abstract methods below */
public class Fibo
{
    String name;  // name or title of method
    int size;  // nth sequence
    int hashID;  // counter for hashIDs in hash map
    ArrayList<Long> list;   // captures current Fibonacci sequence
    HashMap<Integer, Object> hash;  // captures each sequence leading to final result

    /*
     Zero parameter constructor uses Telescoping technique to allow setting of the required value nth
     @param: none
     */
    public Fibo()
    {
        this(20); // telescope to avoid code duplication, using default as 20
    }

    /*
     Construct the nth fibonacci number
     @param: nth number, the value is constrained to 92 because of overflow in a long
     */
    public Fibo(int nth)
    {
        this.size = nth;
        this.list = new ArrayList<>();
        this.hashID = 0;
        this.hash = new HashMap<>();
        //initialize fibonacci and time mvc
        this.init();
    }

    /*
     This Method should be "abstract"
     Leave method as protected, as it is only authorized to extender of the class
     Make new class that extends and defines init()
     Inside references within this class would change from this to super
     Repeat process using for, while, recursion
     */
    protected void init()
    {
        this.name = "Stream";
        Stream.iterate(new long[]{0, 1}, f -> new long[]{f[1], f[0] + f[1]})
            .limit(this.size)
            .forEach(f -> this.setData(f[0]) );
    }

    /*
     * Number is added to fibonacci sequence, current state of "list" is
     * added to hash for hashID "num"
     */
    public void setData(long num)
    {
        list.add(num);
        hash.put(this.hashID++, list.clone());
    }

    /*
     Custom Getter to return last element in fibonacci sequence
     */
    public long getNth()
    {
        return list.get(this.size - 1);
    }

    /*
     Custom Getter to return last fibonacci sequence in HashMap
     */
    public Object getNthSeq(int i)
    {
        return hash.get(i);
    }

    /*
     Console/Terminal supported print method
     */
    public void print()
    {
        System.out.println("Init method = " + this.name);
        System.out.println("fibonacci Number " + this.size + " = " + this.getNth());
        System.out.println("fibonacci List = " + this.list);
        System.out.println("fibonacci Hashmap = " + this.hash);
        for (int i=0 ; i<this.size; i++ )
        {
            System.out.println("fibonacci Sequence " + (i+1) + " = " + this.getNthSeq(i));
        }
    }

    /*
    Tester class method.  If this becomes abstract you will not be able to test it directly ...
    Change this method to  call "main" class of each of the extended classes
     */
    static public void main(String[] args)
    {
        
    }
}
/**
 * FiboForLoop.java
 *
 * Description
 *
 * @author Natalie Beckwith
 * @version 1
 */

/**
 * Main class for FiboForLoop.java
 *
 */
public class MyFibo extends Fibo
{
    public MyFibo(int nth) // last element in sequence #
    {
        super(nth);
        init();
    }
    
    @Override
    protected void init()
    {
        int n0 = 2;
        int n1 = 1;
        int n2 = 1;
        
        super.setData(n1);
        super.setData(n2);
        
        for(int i = 2; i < super.size; i++)
        {
            n2 = n1;
            n1 = n0;
            n0 = n1 + n2;
            
            super.setData(n0);
        }
    }
}
/**
 * MyFibo2.java
 *
 * Description
 *
 * @author Natalie Beckwith
 * @version 1
 */

/**
 * Main class for MyFibo2.java
 *
 */
public class MyFibo2 extends Fibo
{
    public MyFibo2(int nth) // last element in sequence #
    {
        super(nth);
        init();
    }
    
    @Override
    protected void init()
    {
        int n0 = 2;
        int n1 = 1;
        int n2 = 1;
        
        super.setData(n1);
        super.setData(n2);
        
        int i = 2;
        while(i < super.size)
        {
            n2 = n1;
            n1 = n0;
            n0 = n1 + n2;
            
            super.setData(n0);
            
            i++;
        }
    }
 
}
/**
 * MyFibo3.java
 *
 * Description
 *
 * @author Natalie Beckwith
 * @version 1
 */

/**
 * Main class for MyFibo3.java
 *
 */
public class MyFibo3 extends Fibo
{
    public MyFibo3(int nth) // last element in sequence #
    {
        super(nth);
        init();
    }
    
    @Override
    protected void init()
    {
        // for loop 0 -> size
        for (int i = 1; i < super.size; i++)
        {
            int value = computeSequence(i);
            super.setData(value);
        }
    }
    
    private int computeSequence(int nth)
    {
        int sequence;
        
        if ((nth == 1) || (nth == 2))
        {
            return 1;
        }
        else
        {
            sequence = computeSequence(nth - 1) + computeSequence(nth - 2);
            return sequence;
        }
    }
}
System.out.print("\nFor Loop:\n");

        //Fibo fib = new Fibo();
        //fib.print();
        
        MyFibo myFibo = new MyFibo(20);
        myFibo.print();

        System.out.print("\n");

        System.out.print("\nWhile Loop:\n");
        
        MyFibo2 myFibo2 = new MyFibo2(20);
        myFibo2.print();

        System.out.print("\n");

        System.out.print("\nRecursion:\n");

        MyFibo3 myFibo3 = new MyFibo3(20);
        myFibo3.print();
For Loop:
Init method = null
fibonacci Number 20 = 10946
fibonacci List = [1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946]
fibonacci Hashmap = {0=[1], 1=[1, 1], 2=[1, 1, 3], 3=[1, 1, 3, 5], 4=[1, 1, 3, 5, 8], 5=[1, 1, 3, 5, 8, 13], 6=[1, 1, 3, 5, 8, 13, 21], 7=[1, 1, 3, 5, 8, 13, 21, 34], 8=[1, 1, 3, 5, 8, 13, 21, 34, 55], 9=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89], 10=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144], 11=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233], 12=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377], 13=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610], 14=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987], 15=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597], 16=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584], 17=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181], 18=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765], 19=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946], 20=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1], 21=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1], 22=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3], 23=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5], 24=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8], 25=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13], 26=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21], 27=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34], 28=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55], 29=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55, 89], 30=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144], 31=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233], 32=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377], 33=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610], 34=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987], 35=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597], 36=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584], 37=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181], 38=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765], 39=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946]}
fibonacci Sequence 1 = [1]
fibonacci Sequence 2 = [1, 1]
fibonacci Sequence 3 = [1, 1, 3]
fibonacci Sequence 4 = [1, 1, 3, 5]
fibonacci Sequence 5 = [1, 1, 3, 5, 8]
fibonacci Sequence 6 = [1, 1, 3, 5, 8, 13]
fibonacci Sequence 7 = [1, 1, 3, 5, 8, 13, 21]
fibonacci Sequence 8 = [1, 1, 3, 5, 8, 13, 21, 34]
fibonacci Sequence 9 = [1, 1, 3, 5, 8, 13, 21, 34, 55]
fibonacci Sequence 10 = [1, 1, 3, 5, 8, 13, 21, 34, 55, 89]
fibonacci Sequence 11 = [1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144]
fibonacci Sequence 12 = [1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233]
fibonacci Sequence 13 = [1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377]
fibonacci Sequence 14 = [1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610]
fibonacci Sequence 15 = [1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987]
fibonacci Sequence 16 = [1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597]
fibonacci Sequence 17 = [1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584]
fibonacci Sequence 18 = [1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181]
fibonacci Sequence 19 = [1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765]
fibonacci Sequence 20 = [1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946]


While Loop:
Init method = null
fibonacci Number 20 = 10946
fibonacci List = [1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946]
fibonacci Hashmap = {0=[1], 1=[1, 1], 2=[1, 1, 3], 3=[1, 1, 3, 5], 4=[1, 1, 3, 5, 8], 5=[1, 1, 3, 5, 8, 13], 6=[1, 1, 3, 5, 8, 13, 21], 7=[1, 1, 3, 5, 8, 13, 21, 34], 8=[1, 1, 3, 5, 8, 13, 21, 34, 55], 9=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89], 10=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144], 11=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233], 12=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377], 13=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610], 14=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987], 15=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597], 16=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584], 17=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181], 18=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765], 19=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946], 20=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1], 21=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1], 22=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3], 23=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5], 24=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8], 25=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13], 26=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21], 27=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34], 28=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55], 29=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55, 89], 30=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144], 31=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233], 32=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377], 33=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610], 34=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987], 35=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597], 36=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584], 37=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181], 38=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765], 39=[1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946]}
fibonacci Sequence 1 = [1]
fibonacci Sequence 2 = [1, 1]
fibonacci Sequence 3 = [1, 1, 3]
fibonacci Sequence 4 = [1, 1, 3, 5]
fibonacci Sequence 5 = [1, 1, 3, 5, 8]
fibonacci Sequence 6 = [1, 1, 3, 5, 8, 13]
fibonacci Sequence 7 = [1, 1, 3, 5, 8, 13, 21]
fibonacci Sequence 8 = [1, 1, 3, 5, 8, 13, 21, 34]
fibonacci Sequence 9 = [1, 1, 3, 5, 8, 13, 21, 34, 55]
fibonacci Sequence 10 = [1, 1, 3, 5, 8, 13, 21, 34, 55, 89]
fibonacci Sequence 11 = [1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144]
fibonacci Sequence 12 = [1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233]
fibonacci Sequence 13 = [1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377]
fibonacci Sequence 14 = [1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610]
fibonacci Sequence 15 = [1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987]
fibonacci Sequence 16 = [1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597]
fibonacci Sequence 17 = [1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584]
fibonacci Sequence 18 = [1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181]
fibonacci Sequence 19 = [1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765]
fibonacci Sequence 20 = [1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946]


Recursion:
Init method = null
fibonacci Number 20 = 6765
fibonacci List = [6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765]
fibonacci Hashmap = {0=[6765], 1=[6765, 6765], 2=[6765, 6765, 6765], 3=[6765, 6765, 6765, 6765], 4=[6765, 6765, 6765, 6765, 6765], 5=[6765, 6765, 6765, 6765, 6765, 6765], 6=[6765, 6765, 6765, 6765, 6765, 6765, 6765], 7=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 8=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 9=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 10=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 11=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 12=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 13=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 14=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 15=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 16=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 17=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 18=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 19=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 20=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 21=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 22=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 23=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 24=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 25=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 26=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 27=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 28=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 29=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 30=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 31=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 32=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 33=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 34=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 35=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 36=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 37=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 38=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765], 39=[6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765]}
fibonacci Sequence 1 = [6765]
fibonacci Sequence 2 = [6765, 6765]
fibonacci Sequence 3 = [6765, 6765, 6765]
fibonacci Sequence 4 = [6765, 6765, 6765, 6765]
fibonacci Sequence 5 = [6765, 6765, 6765, 6765, 6765]
fibonacci Sequence 6 = [6765, 6765, 6765, 6765, 6765, 6765]
fibonacci Sequence 7 = [6765, 6765, 6765, 6765, 6765, 6765, 6765]
fibonacci Sequence 8 = [6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765]
fibonacci Sequence 9 = [6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765]
fibonacci Sequence 10 = [6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765]
fibonacci Sequence 11 = [6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765]
fibonacci Sequence 12 = [6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765]
fibonacci Sequence 13 = [6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765]
fibonacci Sequence 14 = [6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765]
fibonacci Sequence 15 = [6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765]
fibonacci Sequence 16 = [6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765]
fibonacci Sequence 17 = [6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765]
fibonacci Sequence 18 = [6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765]
fibonacci Sequence 19 = [6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765]
fibonacci Sequence 20 = [6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765, 6765]

Hacks

  • Skill 1.B: Determine code that would be used to complete code segments (ie For, While, Recursion)
  • Skill 4.C: Determine if two or more code segments yield equivalent results (be sure to Discuss how you know results are the same)
  • Skill 5.A: Describe the behavior of a given segment of program code (describe the difference in recursion versus for & while loops, perhaps add timing to determine speed)