NeetCode #711LC-656Hard1-D Dynamic Programming
← Back to All Problems#711 · #656 · Coin Path(金币路径)
📌 Problem Statement & Constraints
Given an integer array
coins, where 0 marks a position you may not land on, and an integer maxJump, find a path from index 0 to index n - 1 in which each jump advances between 1 and maxJump positions and the total cost (the sum of landed coins, including both endpoints) is minimised. Return the path as a list of 1-indexed positions, or an empty list if none exists. Constraints: 1 <= n <= 1000, 0 <= coins[i] <= 10^4, 1 <= maxJump <= 1000.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!