GATEverse
← GATE CSE 2000

Q16

MCQMarks unknown

A recursive program to compute Fibonacci numbers is shown below. Assume you are also given an array f[0…m]f [ 0\ldots m] with all elements initialized to 0.0. fib(n) { if (n > M) error (); if (n == 0) return 1; if (n == 1)return 1; if (▭)________________________(1) return ▭__________________(2) t = fib(n - 1) + fib(n - 2); ▭_____________________________(3) return t; }

Sign in to save attempts.

Loading…