Available question text
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.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1575. Count All Possible Routes
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source