threeal / leetspace

A dedicated workspace and archive for my LeetCode submissions
https://leetcode.com/threeal
MIT License
1 stars 1 forks source link

Solve Problem 1514. Path with Maximum Probability Without Queue #1815

Closed threeal closed 2 months ago

threeal commented 2 months ago

This issue suggests modifying the solution to the problem 1514. Path with Maximum Probability without using a queue. Apparently, from other submissions, it seems that repeatedly updating the maximum probabilities array while it can still be updated is more optimized compared to using a queue that prioritizes nodes where the maximum probabilities are updated.