New
ML System Design & SQL tracks just landed
See what's new
×
Question Bank
Pricing
Blog
Forum
HOT
JobRadar
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
Bloomberg
Coding Question
AI Insights
Quick Summary
Find the shortest path from a start point to a destination in a grid containing obstacles.
Movement is constrained by a fuel limit that decreases with every single step taken.
Gas stations act as checkpoints that instantly restore the tank to full capacity upon entry.
What This Tests
Breadth-First Search (BFS) implementation on a grid
Extending state definitions to include resource levels
Pruning redundant computations using auxiliary data structures
Common Patterns
Graph Traversal
DFS/BFS
Collapse
Hint 1
Hint 2
Hint 3
What Interviewers May Ask Next
Accepted
1.3k
/3.6k
Acceptance Rate
35.4%
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.6-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
grid =
fuelCapacity =
Output
Expected