← 返回 google 的题目列表Least Probability Path in Grid with Catch Risks
类型:online_judge
google
You are given a grid of students passing notes, a start coordinate, an end coordinate, and a function that returns the probability of 2 students getting caught passing the note. Return the path with the least probability of getting caught from the start to the end.
Example
Input
grid = [[0.1, 0.3], [0.5, 0.2]]
start = (0, 0)
end = (1, 1)