Module Digit DP

Digit DP

**Frequency: 2/10** Digit DP problems usually ask you to count the number of numbers in a range satisfying some certain conditions. The problem statements for Digit DP typically have clear indications that the technique should be used. Hence, in a contest, it is essential to manage your time wisely when attempting Digit DP problems, as problem setters intentionally make them challenging to code. Tip: When solving problems, consider using a different number base if necessary, such as base-2, to optimize time complexity.

Resources

- [Scaler: Digit DP](https://www.scaler.com/topics/data-structures/digit-dp/)

Problems

Unlucky number 94 / 102 1300
Digit Sum 109 / 116 1400
Divisible 66 / 83 1400
Prime digit sum 73 / 80 1500
Non-palindrome number 60 / 77 1500
Taboo substring 20 / 35 1600
Yet another XOR problem 23 / 29 1600
Balanced number 12 / 16 2000
Equation 17 / 28 2100
Beautiful number 16 / 34 2100
Constructing numbers 14 / 15 2200