Question: Part 2b. Sparse table generation Notice that for many values i, fibby(i) = fibby(i+1). Implement the method public static void printsparsetable(int start, int end). Output
Part 2b. Sparse table generation
Notice that for many values i, fibby(i) = fibby(i+1). Implement the method public static void printsparsetable(int start, int end). Output using System.out.println all consecutive values of n and fibby(n) (just the two numeric values separated by a space) where and . However, skip a line of output if the previous row printed has the same fibby value.
For example, if you call printsparsetable(5, 10); you would print:
5 6
6 8
8 11
Note that even though fibby(4) == fibby(5), since we didnt print fibby(4), we still print fibby(5). But weskip fibby(7) because it equals the previously printed fibby value. A helper method will probably help with this.
You may not make use of any Java classes other than incidental use of Strings, calls to System.out.println, and accessing an existing array passed to your method. The tester program will verify that your program contains no imports, no use of new, and the only uses of . (dot) are within calls to System.out.println, accessing array .length, or followed by a digit (double literals).
You may not use for or while. Any looping must be accomplished using recursion. The testerprogram will check for no fors or whiles and may be triggered by the word in a comment.
You may not declare static or non-static member fields only local or parameter variables allowed.
You may implement additional helper methods to use the recursive driver technique as we did with the find method in class.
Part 2b is connect to part 2a which can be referenced as follows.

Part 2a. Recursive definition (20 pts) Implement the method public static int fibby(int n). fibby is mathematically defined for nonnegative values in the following way: fibby(0) 1 fibby(n)-fibby(In/4])+ fibby(13n/4]) where n > 0and [x] means the floor of x (round down). HINT: recall Java's integer division behavior. Table of examples: Iri 1 2 4 7 28 10 20 100
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
