##
Count total number of digits from 1 to n
July 6, 2017

Given a number n, count the total number of digits required to write all numbers from 1 to n. Examples: Input : 13 Output :… Read More »

July 6, 2017

Given a number n, count the total number of digits required to write all numbers from 1 to n. Examples: Input : 13 Output :… Read More »

June 27, 2017

Given an integer n > 0, which denotes the number of digits, the task to find total number of n-digit positive integers which are non-decreasing… Read More »

June 23, 2017

Given a positive value N, we need to find the count of numbers smaller than N such that the difference between the number and sum… Read More »

June 17, 2017

Given an array of ‘n’ numbers. We need to find the first digit of product of these ‘n’ numbers Examples: Input : arr[] = {5,… Read More »

Given a positive integer n. The task is to find count of digits of number which evenly divides the number n. Examples: Input : n… Read More »

June 15, 2017

Given a number n and a digit d, count all occurrences of d in range from 0 to n. Examples: Input : n = 25… Read More »

June 14, 2017

Given a range, print all numbers having unique digits. Examples: Input : 10 20 Output : 10 12 13 14 15 16 17 18 19… Read More »

June 12, 2017

Given a string representing a number, we need to get the sum of all possible sub strings of this string. Examples: Input : s =… Read More »

June 4, 2017

Given a number N, the task is to check whether the number is Automorphic number or not. A number is called Automorphic number if and… Read More »

Consider a series of numbers composed of only digits 4 and 7. First few numbers in the series are 4, 7, 44, 47, 74, 44744,..… Read More »

May 27, 2017

Given a number n, find out the n-th positive number made up of even digits (0, 2, 4, 6, 8) only. Firs few numbers made… Read More »

May 16, 2017

Given a number n, find the first k digits of nn, where k is a value less than the number of digits in nn Input… Read More »

May 14, 2017

Given a value k, generate all well ordered numbers of length k. Well ordered means that digits should be in increasing. Examples: Input : K… Read More »

May 11, 2017

Given an integer n and its base b. The task is to check if given number is Pandigital Number in the given base or not.… Read More »

May 7, 2017

Write a C program to reverse an integer assuming that the input is a 32-bit integer. If the reversed integer overflows, print -1 as the… Read More »