## Reduce N to 1 with minimum number of given operations

Given an integer N, the task is to reduce N to 1 with the following two operations: 1 can be subtracted from each of the… Read More »

## Find the largest number that can be formed by changing at most K digits

Given a string str representing a number and an integer K, the task is to find the largest number that can be formed by changing… Read More »

## Check if two Integer are anagrams of each other

Given two integers A and B, the task is to check whether the given numbers are anagrams of each other or not. Just like strings,… Read More »

## Sum of the digits of square of the given number which has only 1’s as its digits

Given a number represented as a string str consisting of the digit 1 only i.e. 1, 11, 111, …. The task is to find the… Read More »

## Check if the sum of digits of number is divisible by all of its digits

Given an integer N, the task is to check whether the sum of digits of the given number is divisible by all of its digits… Read More »

## Find the first N integers such that the sum of their digits is equal to 10

Given an integer N, the task is to print first N integers whose sum of digits is 10. Examples: Input: N = 4 Output: 19… Read More »

## Sum of last digit of all integers from 1 to N divisible by M

Given two integer N and N. The task is to compute the sum of last digit of all integer from 1 to N that is… Read More »

## First N terms whose sum of digits is a multiple of 10

Given an integer N, the task is to print the first N terms whose sum of digits is a multiple of 10. First few terms… Read More »

## Count of integers in a range which have even number of odd digits and odd number of even digits

Given a range [L, R], the task is to count the numbers which have even number of odd digits and odd number of even digits.… Read More »

## Reduce number to a single digit by subtracting adjacent digits repeatedly

Given a number N, the task is to reduce it to a single-digit number by repeatedly subtracting the adjacent digits. That is, in the first… Read More »

## Find the remainder when First digit of a number is divided by its Last digit

Given a number N, find the remainder when the first digit of N is divided by its last digit. Examples: Input: N = 1234 Output:… Read More »

## Count the number of occurrences of a particular digit in a number

Given a number N and a digit D, the task is to count the occurrences of D in N. Examples: Input: N = 25, D… Read More »

## Find the smallest positive number which can not be represented by given digits

Given an array arr[] of size 10 where arr[i] represents the frequency of the digit i. The task is to find the smallest positive number… Read More »

## Find the maximum sum of digits of the product of two numbers

Given an array arr[] of size N( > 2). The task is to find the maximum sum of digits of the product of any two… Read More »

## Program to find the last two digits of x^y

The task is to find the last two digits of x^y. Since the digits with which it can end are 0-9, Hence this problem can… Read More »