# Tag Archives: digit-DP

Given a positive integer N, the task is to count the number of N-digit numbers which contain all single digit primes. Examples: Input: N =… Read More
Given a positive integer N, the task is to find the number of N-digit numbers such that at least one digit in the number has… Read More
Given three integers N, L, and R, the task is to print the total count of ways to form a necklace of at most N… Read More
Given a positive integer N, the task is to count the number of N-digit numbers where each digit in the number is the mean of… Read More
Given a positive integer N, the task is to count the number of N-digit numbers such that the bitwise AND of adjacent digits equals 0.… Read More
Given a string S containing digits and character ‘*’ i.e. hidden character, the task is to find the number of ways to decode this hidden… Read More
Given two integers L and R, the task is to find the count of numbers in the range [L, R] having prime digits at prime… Read More
Given an integer N and an array maxDigit[], the task is to count all the distinct N-digit numbers such that digit i does not appear… Read More
Given three positive integers L, R and K, the task is to count the numbers in the range [L, R] whose product of digits is… Read More
Given three positive integers L, R and Y, the task is to count the numbers in the range [L, R] whose sum of digits is… Read More
Given an array arr[] consisting of N positive integers and the integers X and M, where 0 <= X < M, the task is to… Read More
Given three positive integers L, R, and K, the task is to find the count of numbers in the range [L, R] having K consecutive… Read More
Given an integer N, the task is to count the numbers up to N having an absolute difference of at most K between any two… Read More
Given an integer array arr of size N. The task is to find the maximum number of splits such that each split has sum divisible… Read More
Given string str that represents a number. The task is to find all possible ways to split the given string such that each segment is… Read More