4D Dp solution(c++ solution)
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 {\n    using ll = long long;\n    int mod= 1e9+7;\n    ll dp[100001][2][3][2];\n    ll f(int ind,int l,int e,int t,int n){\n        if(ind == n){\n            if(l == 0 && e== 0 && t == 0)return 1;\n            else return 0;\n        }\n        \n        if(dp[ind][l][e][t]!=-1)return dp[ind][l][e][t];\n        \n        ll ans = 0;\n        for(int i=0;i<26;i++){\n            if(l>0 && (i+\'a\') == \'l\'){\n                ans+=1LL*f(ind+1,l-1,e,t,n);\n            }\n            else if(e>0 && (i+\'a\') == \'e\'){\n                ans+=1LL*f(ind+1,l,e-1,t,n);\n            }\n            else if(t>0 && (i+\'a\') == \'t\'){\n                ans+=1LL*f(ind+1,l,e,t-1,n);\n            }\n            else{\n                ans+=1LL*f(ind+1,l,e,t,n);\n            }\n        }\n        return dp[ind][l][e][t] = ans%mod;\n    }\npublic:\n    int stringCount(int n) {\n        \n        memset(dp,-1,sizeof(dp));\n        ll ans = f(0,1,2,1,n);\n        return ans%mod;\n    }\n};\n```
['C++']