C++ || Easy to understand🔥
Code\n\nclass Solution {\npublic:\n    int mod = 1e9 + 7;\n    int x = \'l\' - \'a\', y = \'e\' - \'a\', z = \'t\' - \'a\';\n    int dp[100001][2][2][3];\n    i
# Code\n```\nclass Solution {\npublic:\n    int mod = 1e9 + 7;\n    int x = \'l\' - \'a\', y = \'e\' - \'a\', z = \'t\' - \'a\';\n    int dp[100001][2][2][3];\n    int func(int ind, int n, bool l, bool t, int count){\n        if(ind == n){\n            return (l && t && count==2);\n        }\n        if(dp[ind][l][t][count] != -1) return dp[ind][l][t][count];\n        int ans = 0;\n        for(int i = 0 ; i < 26 ; i++) {\n            ans = (ans + func(ind + 1, n, (l || i == x) ? 1 : 0, (t || z == i) ? 1 : 0, (y == i) ? min(2,count + 1) : count)) % mod;\n        }\n        return dp[ind][l][t][count] = ans;\n    }\n    \n    int stringCount(int n) {\n        memset(dp, -1, sizeof(dp));\n        return func(0, n, false, false, 0);\n    }\n};\n```
['C++']