โ† OYO questions

Shortest path from source to destination in a grid with obstacles

Filed under OYO

Given a grid where empty cells are '.' and blocked cells are 'B', find the minimum distance to travel from a source cell 'S' to a destination cell 'D' moving in 4 directions.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related OYO questions

Collected from public candidate posts and coding forums. Updated Nov 2026.