# Tag Archives: Fibonacci

## Length of longest subsequence of Fibonacci Numbers in an Array

Given an array arr containing non-negative integers, the task is to print the length of the longest subsequence of Fibonacci numbers in this array. Examples:… Read More »

## Remove all nodes from a Doubly Linked List containing Fibonacci numbers

Given a doubly linked list containing N nodes, the task is to remove all the nodes from the list which contains Fibonacci numbers. Examples: Input:… Read More »

## Count of Fibonacci pairs which satisfy the given equation

Given an array arr[] containing Q positive integers and two numbers A and B, the task is to find the number of ordered pairs (x,… Read More »

## Find the next Non-Fibonacci number

Given a number N, the task is to find the next Non-Fibonacci number. Examples: Input: N = 4 Output: 6 6 is the next non-fibonacci… Read More »

## Sum of all Non-Fibonacci numbers in a range for Q queries

Given Q queries containing ranges in the form of [L, R], the task is to find the sum of all non-fibonacci numbers for each range… Read More »

## Count of consecutive Fibonacci pairs in the given Array

Given an array arr[], the task is to count the number of consecutive Fibonacci pairs in this array. Examples: Input: arr[] = { 3, 5,… Read More »

## Count non-adjacent subsets from numbers arranged in Circular fashion

Given that N people are sitting in a circular queue numbered from 1 to N, the task is to count the number of ways to… Read More »

## Find the previous fibonacci number

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 »

## Find the next fibonacci number

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 »

## Program to find Nth odd Fibonacci Number

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 »

## C++ Program to print Fibonacci Series using Class template

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 »

## Find the Nth element of the modified Fibonacci series

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 »

## Find F(n) when F(i) and F(j) of a sequence are given

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 »

## Fibonacci Number modulo M and Pisano Period

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… Read More »

## Nth Fibonacci number using Pell’s equation

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 »