## Finding sum of digits of a number until sum becomes single digit

Given a number n, we need to find the sum of its digits such that: If n < 10 digSum(n) = n Else digSum(n) =… Read More »

- Program to find the last two digits of x^y
- Nth number whose sum of digit is multiple of 10
- Reduce number to a single digit by subtracting adjacent digits repeatedly
- Append a digit in the end to make the number equal to the length of the remaining string
- Count of integers in a range which have even number of odd digits and odd number of even digits
- Check if the sum of digits of number is divisible by all of its digits
- Round the given number to nearest multiple of 10 | Set-2
- Maximum number formed from array with K number of adjacent swaps allowed
- First N terms whose sum of digits is a multiple of 10
- Find the maximum sum of digits of the product of two numbers
- Largest and smallest digit of a number
- Nearest greater number by interchanging the digits
- Find the smallest positive number which can not be represented by given digits
- Count the number of digits of palindrome numbers in an array
- Check if two numbers have same number of digits
- Reduce N to 1 with minimum number of given operations
- Count the number of occurrences of a particular digit in a number
- Count the nodes in the given tree whose sum of digits of weight is odd
- Sum of the digits of square of the given number which has only 1's as its digits
- Find the first N integers such that the sum of their digits is equal to 10
- Sum of last digit of all integers from 1 to N divisible by M
- Find the remainder when First digit of a number is divided by its Last digit
- Minimum possible number with the given operation
- Check if two Integer are anagrams of each other
- Count of matchsticks required to represent the given number
- Find the largest number that can be formed by changing at most K digits

Given a number n, we need to find the sum of its digits such that: If n < 10 digSum(n) = n Else digSum(n) =… Read More »

Given a number n, find number of digits in n’th Fibonacci Numbers. First few Fibinacci numbers are 0, 1, 1, 2, 3, 5, 8, 13,… Read More »

We are given a string consisting of digits, we may group these digits into sub-groups (but maintaining their original order). The task is to count… Read More »

Boom numbers are numbers consisting only of digits 2 and 3. Given an integer k (0<k<=10^7) , display the k-th Boom number. Examples: Input :… Read More »

Given number of digits n, print all n-digit numbers whose absolute difference between sum of digits at even and odd positions is 1. Solution should… Read More »

Given number of digits n, print all n-digit numbers whose sum of digits adds upto given sum. Solution should not consider leading 0’s as digits.… Read More »

Given an integer n (can be very large), find the number of digits that appear in its factorial, where factorial is defined as, factorial(n) =… Read More »

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 = 2… 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 »