##
Maximum games played by winner
August 20, 2017

There are N players which are playing a tournament. We need to find the maximum number of games the winner can play. In this tournament,… Read More »

August 20, 2017

There are N players which are playing a tournament. We need to find the maximum number of games the winner can play. In this tournament,… Read More »

June 29, 2017

We have been given an array and our task is to check if the element of array is present in Fibonacci series or not. If… Read More »

June 23, 2017

Given a number N, the task is to evaluate below expression. Expected time complexity is O(1). f(n-1)*f(n+1) – f(n)*f(n) Where f(n) is the n-th Fibonacci… Read More »

June 11, 2017

The Fibonacci sequence is defined as = + where = 1 and = 1 are the seeds. For a given prime number p, consider a… Read More »

June 4, 2017

We know Fibonacci number, Fn = Fn-1 + Fn-2. First few Fibonacci numbers are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55,… Read More »

May 24, 2017

We are given a variable n, we need to find whether Fibonacci number will be multiple of 10 or not. Examples: Input : 15 Output… Read More »

May 21, 2017

Given an array with positive number the task is that we find largest subset from array that contain elements which are Fibonacci numbers. Asked in… Read More »

May 20, 2017

We are given a Fibonacci number. First few Fibonacci numbers are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, …..… Read More »

May 15, 2017

Write a tail recursive function for calculating the n-th Fibonacci number. Examples: Input : n = 4 Output : fib(4) = 3 Input : n… Read More »

May 5, 2017

Given a number n, find n-th Fibonacci Number. Note that n may be large. Examples: Input : 100 Output : 218922995834555169026 Input : 500 Output… Read More »

March 12, 2017

Given a positive integer N. The task is to find the number of ways of representing N as a sum of 1s and 2s. Examples:… Read More »

November 16, 2016

Given two integers n and k. Find position the n’th multiple of K in the Fibonacci series. Examples: Input : k = 2, n =… Read More »

November 5, 2016

Given a limit, find the sum of all the even-valued terms in the Fibonacci sequence below given limit. The first few terms of Fibonacci Numbers… Read More »

Given a value n, find the n’th even Fibonacci Number. Input : n = 3 Output : 34 Input : n = 4 Output :… Read More »

October 19, 2016

You are given two positive numbers M and N. The task is to print greatest common divisor of M’th and N’th Fibonacci Numbers. The first… Read More »