Courses
Tutorials
Interview Prep
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.4K+ articles
Misc
7.7K+ articles
Mathematical
5.1K+ articles
Arrays
4.2K+ articles
Strings
2.1K+ articles
Greedy
1.4K+ articles
number-theory
424+ articles
Numbers
327+ articles
divisibility
294+ articles
number-digits
612+ posts
Recent Articles
Popular Articles
Count Substrings with Frequencies Less than Maximum Digit
Last Updated: 31 December 2023
Given a string S of length N. Then your task is to find the count of substrings such that, the frequency of each digit in that substring must be less than the maximum digi...
read more
Mathematical
Geeks Premier League
DSA
number-digits
substring
Geeks Premier League 2023
Maximize the number formed by replacing adjacent digits with their sum
Last Updated: 07 November 2022
Given a number N without leading 0s, the task is to find the maximum number formed after replacing any two adjacent digits by their sum only once.Examples:Input: 10057Outp...
read more
Misc
Greedy
Mathematical
DSA
number-digits
Find the maximum number formed by swapping digits of same parity
Last Updated: 01 July 2022
Given a number N, the task is to maximize this number by following the given conditions:The odd digit of the number can only be swapped by any odd digit present in the giv...
read more
Greedy
Mathematical
DSA
number-digits
Largest integer divisible by 9 after inserting any digit in N
Last Updated: 16 June 2022
Given a large integer N, the task is to find the largest possible integer which is divisible by 9 after inserting exactly one digit from 0 to 9 anywhere in the N.Note: Lea...
read more
Greedy
Mathematical
DSA
number-digits
Count of Integers in given range consisting only given set of Digits
Last Updated: 23 July 2025
Given two integers L and R, and an array arr[] containing single digit integers, the task is to find all the integers in the range [L, R) consisting of digits from given a...
read more
DSA
number-digits
Count of subarrays with digit sum equals to X
Last Updated: 23 July 2025
Given an array arr[] of length N and integer X, the task is to count no of subarrays having digit sum equal to X.Examples:Input: arr[] = {10, 5, 13, 20, 9}, X = 6Output: 2...
read more
Mathematical
Geeks Premier League
Geeks-Premier-League-2022
DSA
Arrays
number-digits
subarray
Encode Strings in form of "xAyB" where x and y and based on count of digits
Last Updated: 13 July 2023
Given two numeric string N and M, the task is to encode the given strings in the form "xAyB", where:x is the count of digits that are same in N and M and are present on sa...
read more
Strings
Mathematical
DSA
number-digits
encoding-decoding
Count of digits in N and M that are same but present on different indices
Last Updated: 09 February 2022
Given two numbers N and M, the task is to find the count of digits in N and M that are the same but present on different indices.Examples:Input: N = 123, M = 321Output: 2E...
read more
Mathematical
DSA
number-digits
Count of digits in N and M that are same and are present on the same indices
Last Updated: 12 December 2022
Given two number N and M, the task is to find the count of digits in N and M that are the same and are present on the same indices.Examples:Input: N = 123, M = 321Output: ...
read more
Mathematical
DSA
number-digits
Find two numbers A and B of X and Y digits respectively with GCD having Z digits
Last Updated: 23 July 2025
Given three positive integers X, Y, and Z. The task is to find two numbers A and B of X and Y digits respectively with their GCD having Z digits. where Z ≤ min(X, Y). If t...
read more
Misc
Mathematical
DSA
GCD-LCM
number-digits
Find all N digit integers with sequential digits
Last Updated: 22 February 2022
Given an integer N, the task is to find all N digit integers with sequential digitsExamples:Input: N = 4Output: {1234, 2345, 3456, 4567, 5678, 6789}Explanation: All 4 digi...
read more
Misc
Mathematical
DSA
Arrays
number-digits
Maximum count of digits that can be removed such that remaining integer is consonant
Last Updated: 23 July 2025
Given a string S representing an N digit integer, the task is to find the maximum number of digits that can be removed such that the remaining digits from a consonant inte...
read more
Misc
Mathematical
DSA
Arrays
number-digits
Prime Number
Minimize the number formed by replacing adjacent pair of digits with their sum
Last Updated: 23 July 2025
Given string s denoting a number. The task is to find the minimum number that can be formed after replacing two consecutive digits of s by their sum.Examples:Input: s = "1...
read more
Greedy
Mathematical
Algo Geek
Algo-Geek 2021
DSA
number-digits
Reverse digits of an integer with overflow handled | Set 2
Last Updated: 23 July 2025
Given a 32-bit integer N. The task is to reverse N, if the reversed integer overflows, print -1 as the output.ExamplesInput: N = 123Output: 321Input: N = -123Output: -321I...
read more
Misc
Mathematical
DSA
number-digits
Reverse
Find all numbers in range whose digits are increasing decreasing alternatively
Last Updated: 01 February 2022
Given integers L and R, find all numbers in range L to R whose digits are increasing-decreasing alternatively i.e. if the digits in the current number are d1, d2, d3, d4, ...
read more
Misc
Mathematical
DSA
Arrays
array-range-queries
number-digits
1
2
3
4
...
41