LeetCode Weekly Contest 197. Path with Maximum Probability

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

I might miss sth.. well, why in line 21: `if new_prob < probs[neighbor]: `. I thought it should be ``if new_prob > probs[neighbor]: ` because we should store the biggest prob. no ?

xiaoweideng
Автор

do we really need a priority queue or a just simple queue would work ? also surprised how it didnt run in cycles since seen set is not used anywhere for checking !

MrThepratik
welcome to shbcf.ru