Final Challenge #1
Lección 8 de 9 del curso Algoritmo de Dijkstra - Algoritmos de grafos de Coddy.
Desafío
IntermedioA menudo, solo te importa un destino.
Escribe una función llamada shortestDistance que reciba n, el array plano edges (triples, dirigidos), un source y un target, y devuelva la distancia más corta desde source hasta target, o -1 si el target es inalcanzable.
Pruébalo tú mismo
#include <stdlib.h>
int shortestDistance(int n, int* edges, int edges_size, int source, int target) {
// Escribe el código aquí
return -1;
}