DIGITMASK
Digitmask, sometimes written as DIGITMASK, is a compact data representation used in computing to encode a subset of decimal digits 0 through 9 as a bitmask. The concept uses a ten-bit field, where bit i corresponds to digit i and is set if that digit occurs in the input. This allows a quick, space-efficient way to track which digits appear in a number, string, or sequence of symbols.
To construct a digitmask, each digit in the input is examined and the corresponding bit is turned
DIGITMASKs are widely used in algorithmic problems, such as digit-based constraints, digit DP, and fast membership