C++ Easy Solution
Code\n\nclass Solution {\npublic:\n    int mod = 1e9 + 7;\n    int dp[100001][2][2][3];\n    int solve(int n,int index,bool l,bool t,int count) {\n        if(in
# Code\n```\nclass Solution {\npublic:\n    int mod = 1e9 + 7;\n    int dp[100001][2][2][3];\n    int solve(int n,int index,bool l,bool t,int count) {\n        if(index == n) {\n            if(l && t && count == 2)\n                return 1;\n            return 0;\n        }\n        if(dp[index][l][t][count] != -1)\n            return dp[index][l][t][count];\n        int ans = 0;\n        for(char i = \'a\';i <= \'z\';i++) {\n            if(i == \'l\')\n                ans = (ans + solve(n,index+1,true,t,count))%mod;\n            else if(i == \'t\')\n                ans = (ans + solve(n,index+1,l,true,count))%mod;\n            else if(i == \'e\' && count == 0)\n                ans = (ans + solve(n,index+1,l,t,1))%mod;\n            else if(i == \'e\' && count >= 1)\n                ans = (ans + solve(n,index+1,l,t,2))%mod;\n            else\n                ans = (ans + solve(n,index+1,l,t,count))%mod;\n        }\n        return dp[index][l][t][count] = ans;\n    }\n    int stringCount(int n) {\n        memset(dp, -1, sizeof(dp));\n        return solve(n,0,0,0,0);\n    }\n};\n```
['Dynamic Programming', 'Recursion', 'Memoization', 'C++']