DP || Easy Solution || Beats 68%
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:\nO(n*n)\n\n- Space complexity:\nO(n*n)\n\n# Code\n```\nclass Solution {\npublic:\n    string kthSmallestPath(vector<int>& dest, int k) {\n        int dp[dest[0]+2][dest[1]+2];\n        memset(dp,0,sizeof(dp));\n        for(int i=0;i<=dest[0];i++)dp[i][dest[1]]=1;\n        for(int i=0;i<=dest[1];i++)dp[dest[0]][i]=1;\n        for(int i=dest[1]-1;i>=0;i--){\n            for(int j=dest[0]-1;j>=0;j--){\n                dp[j][i]=dp[j+1][i]+dp[j][i+1];\n            }\n        }\n        string ans="";\n        int i=0,j=0;\n        while(j<dest[1] || i<dest[0]){\n            if(dp[i][j+1]>=k){\n                ans.push_back(\'H\');\n                j++;\n            }\n            else{\n                ans.push_back(\'V\');\n                k-=dp[i][j+1];\n                i++;\n            }\n        }\n        return ans;\n    }\n};\n```
['C++']