You are given a binary string binary. A subsequence of binary is considered good if it is not empty and does not contain leading zeros, with the exception of the string "0" itself.
Return the total number of unique good subsequences of binary. Because the answer may be very large, return it modulo
Note: A subsequence is a sequence that can be derived from another sequence by deleting zero or more elements without changing the order of the remaining elements.
Constraints:
binary.length
binary consists only of '0' and '1'.
You are given a binary string binary. A subsequence of binary is considered good if it is not empty and does not contain leading zeros, with the exception of the string "0" itself.
Return the total number of unique good subsequences of binary. Because the answer may be very large, return it modulo
Note: A subsequence is a sequence that can be derived from another sequence by deleting zero or more elements without changing the order of the remaining elements.
Constraints:
binary.length
binary consists only of '0' and '1'.