Leetcode 1514. Path with Maximum Probability

Input: n = 3, edges = [[0,1],[1,2],[0,2]], succProb = [0.5,0.5,0.2], start = 0, end = 2
Output: 0.25000
Explanation: There are two paths from start to end, one having a probability of success = 0.2 and the other has 0.5 * 0.5 = 0.25.
Input: n = 3, edges = [[0,1],[1,2],[0,2]], succProb = [0.5,0.5,0.3], start = 0, end = 2
Output: 0.30000
Input: n = 3, edges = [[0,1]], succProb = [0.5], start = 0, end = 2
Output: 0.00000
Explanation: There is no path between 0 and 2.

--

--

--

CS new grad, 6 years experience related to supply chain management. Located in Bay area

Love podcasts or audiobooks? Learn on the go with our new app.

Spring Security: Develop a REST-Service Secured With OAuth2, Bitbucket and JWT

JetRVR AI Robot Part 2 — Setting up the Jetson Nano & RVR

3 Ways to Supercharge Your Career as a Salesforce Platform App Builder

Badges for App Customization Specialist, Process Automation Specialist, and Security Specialist—Hootie sits on the last one.

Migrating from PostgreSQL to GridDB

Swift Shootout Airdrop $5,000 worth of $SHOOT

Twist: A Programming Language for Quantum Computing

Cypress

Learn how to easily pull Google Trends Data (With Python Code)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Gary Chiang

Gary Chiang

CS new grad, 6 years experience related to supply chain management. Located in Bay area

More from Medium

Leetcode 701. Insert into a Binary Search Tree

Longest Substring Without Repeating Characters📸

Behavior Questions Prep 28/1

What is a Stack?