## Vampire Number

Introduction to Vampire Number and its implementation using python. Introduction In mathematics, a vampire number (or true vampire number) is a composite natural number v,… Read More »

## Count of numbers satisfying m + sum(m) + sum(sum(m)) = N

Given an integer N, find out the count of numbers(m) that satisfy the condition m + sum(m) + sum (sum(m)) = N, where sum(m) denotes… Read More »

## Minimal operations to make a number magical

Given a 6 digit number, calculate the minimum number of digits that needs to be replaced in order to make the number magical. The number… Read More »

## Spy Number (Sum and Products of Digits are same)

A number is said to be a Spy number if the sum of all the digits is equal to the product of all digits. Examples… Read More »

## Generate all cyclic permutations of a number

Given a number N, our task is to generate all the possible cyclic permutations of the number. A cyclic permutation shifts all the elements of… Read More »

## Next higher palindromic number using the same set of digits

Given a palindromic number num having n number of digits. The problem is to find the smallest palindromic number greater than num using the same… Read More »

## Program to count digits in an integer (3 Different Methods)

Count the number of digits in a long integer entered by a user. Recommended: Please try your approach on {IDE} first, before moving on to… Read More »

## Digit – Product – Sequence

Given a number N, the task is to print the sequence upto N. The sequence is : 1, 2, 4, 8, 16, 22, 26, 38,… Read More »

## Next higher number using atmost one swap operation

Given a non-negative number num. The problem is to find the smallest number greater than num by performing atmost on swap operation between any two… Read More »

## Smallest number k such that the product of digits of k is equal to n

Given a non-negative number n. The problem is to find the smallest number k such that the product of digits of k is equal to… Read More »

## Find n-th element in a series with only 2 digits (4 and 7) allowed | Set 2 (log(n) method)

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

## Count even and odd digits in an Integer

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 numbers

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 operation

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 space

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 »