STANDARD DP TYPE MATRIX || NO COMBINATORICS  || EASY AND SHORT || BEATS 100 %
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. -\nStore the total count 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. --->\nStore the total count of paths from each cell to destination(n-1,m-1) using DP in 0(n^2) time.\n\nTo check the next cell will be horizontal or vertical , two conditions are there .\n\n1 ) If K <= dp[row][col+1] , the cell right to the current cell  have more no of paths than left k instruction , then we can go to { row  , col + 1 } and push \'H\' in ans.\n\n2 ) if K > dp[row][col+1] , the cell right to the current cell have lesser no paths than left k instruction . Hence we need to go to downward / Vertical cell { row + 1 , col  } & push \'V\' in ans . Moreover subtract dp[row][col+1] from k since these count of instructions through horizontal cell must be done to move to vertical cell . \n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n0(n^2)\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n0(n^2)\n# Code\n```\nclass Solution \n{\n    public:\n    int n,m;\n    vector<vector<int>>dp;\n\n    int fill_dp( int i , int j )\n    {\n        if( i >= n || j >= m || i < 0 || j < 0 )\n        return 0;\n\n        if( i == n - 1 && j == m - 1 )\n        return 1;\n\n        if( dp[i][j] != -1 )\n        return dp[i][j];\n\n        return dp[i][j] = fill_dp(i+1,j) + fill_dp(i,j+1);\n\n    }\n\n    string kthSmallestPath(vector<int>& des, int k) \n    {\n        ios_base::sync_with_stdio(false);\n        cin.tie(NULL);\n\n        n = des[0]+1;\n        m = des[1]+1;\n        dp.assign(n,(vector<int>(m,-1)));\n        fill_dp(0,0);\n\n        string ans = "";\n        int r = 0 , c = 0 ;\n\n        while( r != n - 1  && c != m - 1 && k > 0 )\n        {\n             if( k > dp[r][c+1] )\n             {\n                ans.push_back(\'V\');\n                k -= dp[r][c+1];\n                r++;\n             }\n             else \n             {\n                ans.push_back(\'H\');\n                c++;\n             }\n        }\n\n        while( r < n - 1 )\n        {\n            ans.push_back(\'V\');\n            r++;\n        }\n\n        while( c < m - 1 )\n        {\n            ans.push_back(\'H\');\n            c++;\n        }\n\n        return ans;\n    }\n};\n```
['Dynamic Programming', 'Greedy', 'C++']