## Rencontres Number (Counting partial derangements)

Given two numbers, n >= 0 and 0 <= k <= n, count the number of derangements with k fixed points. Examples: Input : n… Read More »

Given two numbers, n >= 0 and 0 <= k <= n, count the number of derangements with k fixed points. Examples: Input : n… Read More »

Given three integers, A, X and n, the task is to print terms of below binomial expression series. (A+X)n = nC0AnX0 + nC1An-1X1 + nC2An-2X2… Read More »

Given the Numerator and Denominator of N fractions. The task is to find the product of N fraction and output the answer in reduced form.… Read More »

Given an array of numbers, the task is to print those numbers in ascending order separated by commas which have 1, 2 and 3 in… Read More »

An array is given of n length, and problem is that we have to find the length of shortest unordered {neither increasing nor decreasing} sub… Read More »

Given a big positive number N. The task is divide N into two number ‘A’ and ‘B’ such that difference between them is K (1… Read More »

When we project 3-D objects on a 2-D screen, we need to detect the faces that are hidden on 2D. Back-Face detection, also known as… Read More »

Given three integers A, B and N the task is to find N Arithmetic means between A and B. We basically need to insert N… Read More »

Dynamic Programming(DP) is a technique to solve problems by breaking them down into overlapping sub-problems which follows the optimal substructure. There are various problems using… Read More »

Given a singly linked list and the task is to find middle of linked list. Examples: Input : 1->2->3->4->5 Output : 3 Input : 1->2->3->4->5->6… Read More »

You are given a function f(n) = (n1 + n2 + n3 + n4), you have to find the value of f(n) mod 5 for… Read More »

You are given an array of n-elements, you have to find the number of operations needed to make all elements of array equal. Where a… Read More »

Given two positive number N and X. The task is to find the sum of digits of a number formed by N repeating X number… Read More »

Given two coordinates of a line as (x1, y1) and (x2, y2), find if the line passing through these points also passes through origin or… Read More »

Given n and a number, the task is to find the sum of n digit numbers that are divisible by given number. Examples: Input :… Read More »