Fill in the code to complete the following method for computing a Fibonacci number.

```
public static long fib(long index) {
if (index == 0) // Base case
return 0;
else if (index == 1) // Base case
return 1;
else // Reduction and recursive calls
return __________________;
}
```
a. fib(index - 1)
b. fib(index - 2)
c. fib(index - 1) + fib(index - 2)
d. fib(index - 2) + fib(index - 1)


cd

Computer Science & Information Technology

You might also like to view...

In the figure above, item 2 allows you to ____.

A. open a menu B. preview your video C. burn to CD D. customize the menu

Computer Science & Information Technology

Compare and contrast the VFS and ext2 representation of an inode.

What will be an ideal response?

Computer Science & Information Technology

In the accompanying figure, Item 1 points to the ____.

A. Clip Art tab B. Media Browser button C. Media Browser D. Clip Art Window

Computer Science & Information Technology

What are the two types of UTP cabling, based on the wire core?

What will be an ideal response?

Computer Science & Information Technology