O(M+N) Time O(1) Space | Combination 1 less when we add 'H' or 'V'
```\n  /  Approach 1 ( Normla matrix dfs approach dont work here TLE )\n    void solve(int i,int j,string out="")\n    {\n        if(i>m or j>n)\n            re
```\n  /*  Approach 1 ( Normla matrix dfs approach dont work here TLE )\n    void solve(int i,int j,string out="")\n    {\n        if(i>m or j>n)\n            return;\n        \n        if(i==m and j==n)\n        {\n            k--;\n            if(k==0)\n                ans=out;\n            \n            return;\n        }\n        solve(i,j+1,out+\'H\');\n        solve(i+1,j,out+\'V\');\n    }*/\n    \n    //Optimized apprpach Time : O(M+N) Space : O(1)\n   //refer this video if you dont get the code -->  https://www.youtube.com/watch?v=-nQJGAY7oMc&list=PLKZaSt2df1gyrDJMAcAEV4j7Q5aFA22RU&index=1\n    \n    int comb(int n,int r)\n    {\n        //caclulating nCr\n        //nCr= { n*(n-1)*(n-2)*.... *(n-r-1) } / {1*2*3..... *r}\n        \n        int ans=1;\n        for(int i=1;i<=r;i++)\n            ans=ans*(n-i+1)/i;   //ans=ans*(n/1)  ans=ans*(n-1)/2  ans\n        \n        return ans;\n    }\n    string kthSmallestPath(vector<int>& destination, int k) {\n        \n        int h=destination[1];\n        int v=destination[0];\n        \n        string ans="";\n        \n        while(h>0 or v>0)\n        {\n            //Case 1 --> Bhai \'h\' pde hue hai to chota instruction shyd bnjaye dekho\n            if(h>0)\n            {\n//IMPORTANT --> h ek kam hai hmare pas aur v utne hi to uske combinations bnao\n                int c=comb(h-1+v,v); \n                \n//k mera combination number ke andr ara to mtlb is jgh pe to \'H\' hi ayega brother\n                if(k<=c)  \n                {\n                    ans+=\'H\';\n                    h--;\n                }\n                    \n                else if(k>c)\n                {\n                    ans+=\'V\';\n                    v--;\n                    k-=c;  //k>c ab maine k ko kam krdiya kya pta aage \'H\' add krpau\n                }   \n            }\n            \n    //case 2 -->bhai agar \'H\' hai hi nahi to fr to \'V\' hi add krte rho jitne bche\n            else\n            {\n                ans+=\'V\';\n                v--;\n            }\n        }\n        return ans;\n    }
[]