Find Shortest Distance Between Multiple Sources and Destinations in Matrix
Given a matrix board containing multiple source points and multiple destination points, find the shortest distance between any source and any destination. Return the minimum distance found among all possible source-destination pairs.
Asked at:
Microsoft
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Mid November, 2025
Microsoft
Mid-level
Given a matrix board with multiple sources and multiple destinations, find shortest distance between any source and any destination.
Hello Interview Premium
Your account is free and you can post anonymously if you choose.