Final Challenge #2
Lesson 9 of 9 in Coddy's Dijkstra's Algorithm - Graph Algorithms course.
Challenge
MediumOne more challenge.
Write a function named farthestDistance that takes n, the flat edges array (triples, directed), and a source, and returns the largest shortest-distance from source to any vertex it can reach. (The source itself is distance 0, so the answer is at least 0.)
Try it yourself
#include <stdlib.h>
int farthestDistance(int n, int* edges, int edges_size, int source) {
// Write code here
return -1;
}