c++ easy solution do upvote
\nclass Solution {\npublic:\n    string kthSmallestPath(vector<int>& destination, int k) {\n        int n=destination[0]+1,m=destination[1]+1;\n        \n      
```\nclass Solution {\npublic:\n    string kthSmallestPath(vector<int>& destination, int k) {\n        int n=destination[0]+1,m=destination[1]+1;\n        \n        //this code is straight forward it calculate and stores no. ways to go to destination from i,j\n        vector<vector<int>> ways(n,vector<int> (m));\n        \n        for(int i=n-1;i>=0;i--){\n            for(int j=m-1;j>=0;j--){\n                if(i==n-1||j==m-1){\n                    ways[i][j]=1; continue;\n                }\n                ways[i][j]=ways[i][j+1]+ways[i+1][j];\n            }\n        }\n\t\t \n\t\t\n\t\t// with the help of above table ans can be generated\n\t\t//suppose we are at (i, j)   we need to decide whether to go Horizontal or Vertical\n\t\n        string ans="";\n        \n        int i=0,j=0;\n        while(i<n-1&&j<m-1){\n\t\t    // if k is less than no of ways to go from selecting horizontal path\n             if(k<=ways[i][j+1]){\n                ans=ans+\'H\';j++; \n             }\n\t\t\t // else we chose vertical for greater k\n            else{\n                k=k-ways[i][j+1];\n                i++;\n                ans=ans+\'V\';\n            }\n            \n         }\n         while(j++<m-1) ans=ans+\'H\';\n         while(i++<n-1) ans=ans+\'V\';\n        \n        return ans;\n        \n    }\n};\n```
['C']