...

/

Challenge: Basic Graph Algorithms

Challenge: Basic Graph Algorithms

Challenge the knowledge you have gained by solving a problem related to basic graph algorithms.

Let's practice what we have learned so far.

Task

There are nn galaxies connected by mm intergalactic teleport-ways. Each teleport-way joins two galaxies and can be traversed in both directions. Also, each teleport-way ee has an associated cost of c(e)c(e) dollars, where c(e)c(e) is a positive integer. A teleport-way can be used multiple times, but the toll must be paid every time it is used. Judy wants to travel from galaxy ...

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy