Search
⌘K

Leetcode 1575. Count All Possible Routes

Count the number of routes from start to finish where you can move between any two cities (revisits allowed) and each move costs the absolute distance between positions, without letting fuel go negative; return the count modulo 1e9+7. The core challenge is combinatorial counting under a bounded resource, typically solved with DP/memoization over (city, remaining fuel) given n ≤ 100 and fuel ≤ 200.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.