Consider the following function to calculate the nth Fibonacci number:long fib (long num){ if (num == 0 || num == 1) return num; return (fib (num - 1) + fib (num - 2));}How many calls does it take to determine fib(4)?
A. 5
B. 9
C. 15
D. 25
Answer: B
Computer Science & Information Technology
You might also like to view...
When an operation is performed on two double values, the result will be a(n) ____________.
a. int b. double c. string d. decimal
Computer Science & Information Technology
The term ________ refers to businesses that have physical store locations as well as a website for online purchases
Fill in the blank(s) with correct word
Computer Science & Information Technology
Fractals that yield an exact copy of the original when a portion of the original image is magnified are called__________fractals.
a. strictly self-similar. b. Koch Curve. c. similar. d. mirror.
Computer Science & Information Technology
When a report is the current Access object, the Property Sheet button is found in the ________ group on the Design tab
A) Controls B) Grouping & Totals C) Themes D) Tools
Computer Science & Information Technology