##
Reverse digits of an integer with overflow handled
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 »

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 »

May 5, 2017

Strong Numbers are the numbers whose sum of factorial of digits is equal to the original number. Given a number, check if it is a… Read More »

April 30, 2017

Count the number of 2s as digit in all numbers from 0 to n. Examples: Input : 22 Output : 6 Explanation: Total 2s that… Read More »

April 27, 2017

The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then… Read More »

April 21, 2017

Given a number, the task is to check if it is tidy or not. A tidy number is a number whose digits are in non-decreasing… Read More »

April 14, 2017

Given a number n, find the Largest number smaller than or equal to n and digits in non-decreasing order. Examples: Input : n = 200… Read More »

April 3, 2017

Given an integer n, the task is to check if frequency of each digit of the number is less than or equal to digit itself.… Read More »

April 1, 2017

Given a number, check whether a given number is divisible by 36 or not. The number may be very large and may not fit in… Read More »

March 31, 2017

Given a number, the task is to find if the number is divisible by 9 or not. The input number may be large and it… Read More »

Given an string of binary number n. Convert binary fractional n into it’s decimal equivalent. Input: n = 110.101 Output: 6.625 Input: n = 101.1101… Read More »

March 28, 2017

Given a large positive number as string, count all rotations of the given number which are divisible by 4. Examples: Input: 8 Output: 1 Input:… Read More »

March 27, 2017

Given a number, the task is to check if a number is divisible by 6 or not. The input number may be large and it… Read More »

March 26, 2017

Given a integer represented as a string, we need to get the sum of all possible substrings of this string. Examples: Input : num =… Read More »

March 25, 2017

Given a number, the task is to check if a number is divisible by 8 or not. The input number may be large and it… Read More »

March 23, 2017

Given a string consisting of some numbers, not separated by any separator. The numbers are positive integers and the sequence increases by one at each… Read More »