Skip to content

Tag Archives: Fibonacci

Given a Fibonacci number N, the task is to find the previous Fibonacci number. Examples: Input: N = 8 Output: 5 5 is the previous… Read More
Given a fibonacci number N, the task is to find the next fibonacci number. Examples: Input: N = 5 Output: 8 8 is the next… Read More
Given an integer N. The task is to find the Nth odd Fibonacci number. The odd number fibonacci series is as: 1, 1, 3, 5,… Read More
Given a number n, the task is to write a program in C++ to print the n-terms of Fibonacci Series using a Class template The… Read More
Given two integers A and B which are the first two terms of the series and another integer N. The task is to find the… Read More
Given five integers i, Fi, j, Fj and N. Where Fi and Fj are the ith and jth term of a sequence which follows the… Read More
Given two number N and M. The task is to find the N-th fibonacci number mod M.In general let FN be the N-th fibonacci number… Read More
Given an integer N, the task is to find the Nth Fibonacci number. Input: N = 13 Output: 144 Input: N = 19 Output: 2584… Read More
Given three integers a, b and N where a and b are the first two terms of the XOR Fibonacci series and the task is… Read More
Given an array of 0s and 1s, If any particular index i has value 1 then it is a safe index and if the value… Read More
Given a number n. You are required to find ( Fib(n) ^ Fib(n) ) % 10^9 + 7, where Fib(n) is the nth fibonacci number.… Read More
Given an M x N matrix mat[][]. The task is to count the number of good cells in the matrix. A cell will be good… Read More
Given a tree, and the weights of all the nodes and an integer X, the task is to count all the nodes i such that… Read More
Given two arrays a[] and b[], the task is to count the pairs (a[i], b[j]) such that (a[i] + b[j]) is a Fibonacci number.Note that… Read More
Given a range [l, r], the task is to find the sum fib(l) + fib(l + 1) + fib(l + 2) + ….. + fib(r)… Read More