## Find nth number that contains the digit k or divisible by k.

You have given two number n and k. You need to find the n-th number that contains the digit k or divisible by k (2… Read More »

You have given two number n and k. You need to find the n-th number that contains the digit k or divisible by k (2… Read More »

Given an array arr[] of size n such that elements of arr[] in range [0, 1, ..n-1]. Our task is to divide the array into… Read More »

In our previous articles on Analysis of Algorithms, we had discussed asymptotic notations, their worst and best case performance etc. in brief. In this article,… Read More »

Given two integers n and m, task is to find a number p which satisfy following conditions : -> The number p should be less… Read More »

George cantor named mathematician gave a proof that set of rational numbers is enumerable. We don’t have to proof it over here rather we have… Read More »

Given a positive integer N, find the maximum number of segments of lengths a, b and c that can be formed from N . Examples… Read More »

Tower of Hanoi is a mathematical puzzle where we have three rods and n disks. The objective of the puzzle is to move the entire… Read More »

A step array is an array of integer where each element has a difference of atmost k with its neighbor. Given a key x, we… Read More »

Given a fraction in form of a/b where a & b are positive integers. Find ΔX such that when it is added to numerator as… Read More »

Given a large number n, find if the number is divisible by 29. Examples: Input : 363927598 Output : No Input : 292929002929 Output :… Read More »

Given two circles of radius r and R, both have their centre at the origin. Now, given another circle of radius r1 and centre at… Read More »

Given two positive integer x and y. we have to find the value of y mod 2x. That is remainder when y is divided by… Read More »

Given an array A[] of n integers, find out the number of ordered pairs such that Ai&Aj is zero, where 0<=(i,j)<n. Consider (i, j) and… Read More »

Given three numbers sum S, prime P and N, find all N prime numbers after prime P such that their sum is equal to S.… Read More »

Given a linear equation, task is to find the value of variable used. The equation contains only ‘+’, ‘-‘ operation, the variable and its coefficient.… Read More »