C++ || Easy solution using DP faster than 95% 💥💥💥
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int numberOfUniqueGoodSubsequences(string binary) {\n        const int mod = 1e9+7;\n        long long dp[2][2] = {};\n        // dp[i][j] stands for number of good subsequences \n        // start with i and end with j \n\n        for(char a : binary){\n            if(a == \'0\'){\n                // to check if there are any \'0\' in the string\n                dp[0][0] = 1;\n\n                // good subsequences end with 0\n                dp[1][0] = (dp[1][0] + dp[1][1]) % mod;\n            }\n            else {\n                // good subsequences end with 1\n                dp[1][1] = (dp[1][0] + dp[1][1] + 1) % mod;\n                // +1 because there will be "1" and then add 1 to the end it become "11"\n                // so adding back "1"\n            }\n        }\n\n        return (dp[1][1] + dp[0][0] + dp[1][0]) % mod;\n    }\n};\n```
['C++']