DP ?
Use DP to find the number of ways to get to the destination cell (m-1, n-1) from every cell (i, j)\n\nAt cell (i, j) deciding to go horizontal or vertical, if d
Use DP to find the number of ways to get to the destination cell (m-1, n-1) from every cell (i, j)\n\nAt cell (i, j) deciding to go horizontal or vertical, if dp[i][j+1] <= k, go horizontal, otherwise vertical then update k.\n\n```\nfunc kthSmallestPath(destination []int, k int) string {\n\tm, n := destination[0] + 1, destination[1] + 1\n\tdp := make([][]int, m)\n\tfor i := range dp { dp[i] = make([]int, n) }\n\tfor i := 0; i < n - 1; i++ { dp[m-1][i] = 1 }\n\tfor i := 0; i < m - 1; i++ { dp[i][n-1] = 1 }\n\tfor i := m - 2; i >= 0; i-- { for j := n - 2; j >= 0; j-- { dp[i][j] = dp[i][j+1] + dp[i+1][j] } }\n\tvar ret string\n\ti, j := 0, 0\n\tfor i < m - 1 || j < n - 1 {\n\t\tif i == m - 1 {\n\t\t\tret += "H"\n\t\t\tj++\n\t\t} else if j == n - 1 {\n\t\t\tret += "V"\n\t\t\ti++\n\t\t} else if k <= dp[i][j+1] {\n\t\t\tret += "H"\n\t\t\tj++\n\t\t} else {\n\t\t\tret += "V"\n            k -= dp[i][j+1]\n\t\t\ti++\n\t\t}\n\t}\n\treturn ret\n}\n```
[]