You are given an integer array coins and an integer maxJump.
You start at index coins.length. From any index maxJump and coins[j] coins[j] coins.
Return the path of coins.length that incurs the minimum total cost. If there are multiple paths with the same minimum cost, return the lexicographically smallest path. If it is impossible to reach the final index, return an empty array.
Constraints:
coins.length
coins[i]
coins[1]
maxJump
You are given an integer array coins and an integer maxJump.
You start at index coins.length. From any index maxJump and coins[j] coins[j] coins.
Return the path of coins.length that incurs the minimum total cost. If there are multiple paths with the same minimum cost, return the lexicographically smallest path. If it is impossible to reach the final index, return an empty array.
Constraints:
coins.length
coins[i]
coins[1]
maxJump