# Tag Archives: number-digits

## Queries for count of even digit sum elements in given range using MO’s Algorithm

Given an array arr[] of N elements, the task is to answer Q queries each having two integers L and R. For each query, the… Read More »

## Range Queries for count of Armstrong numbers in subarray using MO’s algorithm

Given an array arr[] consisting of N elements and Q queries represented by L and R denoting a range, the task is to print the… Read More »

## Check if a number is Full Fibonacci or not

Given a number N, the task is to check if the given number and all its digits are Fibonacci. If so, then the given number… Read More »

## Nth term where K+1th term is product of Kth term with difference of max and min digit of Kth term

Given two integers N and D, the task is to find the value of F(N) where the value of F(1) is D, where F(K) is… Read More »

## Check whether given number N is a Moran Number or not

Given an integer N, check whether the given number is a Moran Number or not. Moran numbers are a subset of Harshad numbers. A number… Read More »

## Cumulative product of digits of all numbers in the given range

Given two integers L and R, the task is to find the cumulative product of digits (i.e. product of the product of digits) of all… Read More »

## Number formed by adding product of its max and min digit K times

Given two integers N and K, the task is to print the number formed by adding product of its max and min digit, K times.… Read More »

## Find the middle digit of a given Number

Given a number N, the task is to find the digit of the given number N. If the number has two middle digits then print… Read More »

## Find the maximum Even Digit Sum node in the given tree

Given a tree with the weights of all the nodes, the task is to find the maximum weighing node whose weight has even digit sum.… Read More »

## Array Range Queries to find the Maximum Armstrong number with updates

Given an array arr[] of N integers, the task is to perform the following two queries:  maximum(start, end): Print the maximum Armstrong number of elements… Read More »

## Count of perfect squares of given length

Given an integer N, the task is to find the number of perfect squares of length N. Examples: Input: N = 1 Output: 3 Explanation:… Read More »

## How to solve problems related to Number-Digits using Recursion?

The process in which a function calls itself directly or indirectly is called recursion and the corresponding function is called a recursive function. Using a… Read More »

## Smallest number greater than or equal to X whose sum of digits is divisible by Y

Given two integers X and Y, the task is to find the smallest number greater than or equal to X whose sum of digits is… Read More »

## Greatest number that can be formed from a pair in a given Array

Given an array arr[], the task is to find the largest number that can be formed from a pair in the given array. Examples: Input:… Read More »

## Remove all the Even Digit Sum Nodes from a Doubly Linked List

Given a Doubly linked list containing N nodes, the task is to remove all the nodes from the list which contains elements whose digit sum… Read More »