# Tag Archives: number-digits

## Count even and odd digits in an IntegerSeptember 7, 2017

A certain number is given and the task is to count even digits and odd digits of the number and also of even digits are… Read More »

## Number of digits in the product of two numbersSeptember 2, 2017

Given two integers a and b. The problem is to find the number of digits in the product of these two integers. Examples: Input :… Read More »

## Form the smallest number using at most one swap operationAugust 30, 2017

Given a non-negative number num. The problem is to apply at most one swap operation on the number num so that the resultant is the… Read More »

## To check a number is palindrome or not without using any extra spaceAugust 28, 2017

Given a number ‘n’ and our goal is to find out it is palindrome or not without using any extra space. We can’t make a… Read More »

## Find smallest permutation of given numberAugust 25, 2017

Given a long integer, return the smallest(magnitude) integer permutation of that number. Examples: Input : 5468001 Output : 1004568 Input : 5341 Output : 1345… Read More »

## Minimum number with digits as 4 and 7 only and given sumAugust 6, 2017

Lucky numbers are the positive integers whose decimal representations contain only the lucky digits 4 and 7. What minimum lucky number has the sum of… Read More »

## Find maximum number that can be formed using digits of a given numberAugust 1, 2017

Given a number, write a program to find a maximum number that can be formed using all of the digits of this number. Examples: Input… Read More »

## Reverse a number using stack

Given a number , write a program to reverse this number using stack. Examples: Input : 365 Output : 563 Input : 6899 Output :… Read More »

## Form the largest number using at most one swap operationJuly 31, 2017

Given a non-negative number num. The problem is to apply at most one swap operation on the number num so that the resultant is the… Read More »

## n-th number with digits in {0, 1, 2, 3, 4, 5}July 25, 2017

Given a number n and we have to find n-th number such that it’s digits only consist 0, 1, 2, 3, 4 or 5. Examples:… Read More »

## Arrange given numbers to form the biggest number | Set 2

Given an array of non-negative numbers(of Integer Range), they are needed to be arranged in some order such that it gives the max number. For… Read More »

## Number of times a number can be replaced by the sum of its digits until it only contains one digitJuly 16, 2017

Count the number of times a number can be replaced by the sum of its digits until it only contains one digit and number can… Read More »

## Get the kth smallest number using the digits of the given number

Given a non-negative number n and a value k. Find the kth smallest number that can be formed using the digits of the given number… Read More »

## Print last k digits of a^b (a raised to power b)July 12, 2017

Given positive integers k, a and b we need to print last k digits of a^b ie.. pow(a, b). Input Constraint: k <= 9, a… Read More »

## Nth Even length PalindromeJuly 7, 2017

Given a number n as string, find the nth even-length positive palindrome number . Examples: Input : n = “1” Output : 11 1st even-length… Read More »