Given an integer n, find the number of digits that appear in its factorial, where factorial is defined as, factorial(n) = 1*2*3*4……..*n and factorial(0) =… Read More »
Given an array of digits (values are from 0 to 9), find the minimum possible sum of two numbers formed from digits of the array.… Read More »
Consider below list where each digit from 1 to 9 maps to few characters. 1 -> [‘A’, ‘B’, ‘C’] 2 -> [‘D’, ‘E’, ‘F’] 3… Read More »
How to find the largest number with given digit sum s and number of digits d? Examples : Input : s = 9, d =… Read More »
How to find the smallest number with given digit sum s and number of digits d? Examples : Input : s = 9, d =… Read More »
Given a number d, representing the number of digits of a number. Find the total count of positive integers which have at-least one zero in… Read More »
Given a digit ‘d’ and a range [L, R] where L < R, print all good numbers in given range that don't contain digit 'd'.… Read More »
Given a number, print words for individual digits. It is not allowed to use if or switch. Examples: Input: n = 123 Output: One Two… Read More »
Given two integers ‘n’ and ‘sum’, find count of all n digit numbers with sum of digits as ‘sum’. Leading 0’s are not counted as… Read More »
A number is non-decreasing if every digit (except the first one) is greater than or equal to previous digit. For example, 223, 4455567, 899, are… Read More »
Given a number and no. of digits to represent the number, find if given number can be represented in given no. of digits in any… Read More »
A number is lucky if all digits of the number are different. How to check if a given number is lucky or not.
Given a number x, find sum of digits in all numbers from 1 to n. Examples:
Given an integer, remove consecutive repeated digits from it.
Given a string ‘str’ of digits and an integer ‘n’, build the lowest possible number by removing ‘n’ digits from the string and not changing… Read More »