Panda Guru LogoPanda
Guru

Shortest Weighted Path, Special Conditions

Round 1

Questions: Find the shortest path with maximum weight in a matrix, from any index in the top row, to any index in the bottom row. Weight is determined as the cumulative product of all probabilities at indices traversed. You need to start in the top row, and can go in 4 directions: Down, Up, Left, Right.

Example matrix is below:

matrix = [ [0.9, 0.9, 0.6, 0.2], [0.1, 0.9, 0.5, 0.3], [0.2, 0.6, 0.4, 0.6], [0.9, 0.5, 0.3, 0.5], ]
Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.