Create a function FindWeightedPath() which wi l l take an ar ray of str ings as input. The structure of the ar ray wi l l be as fol lows: The first
element in the ar ray wi l l be the number of nodes N (points) in the ar ray as a str ing. The next N elements wi l l be the nodes which can be
anything (A, B, C. . Street A, Street B. . etc.). Then after the Nth element, the rest of the elements in the ar ray wi l l be the connections
between al l of the nodes along with their weights (integers) separated by the pipe symbol (| ). They wi l l look l ike this: (A| B| 3, B| C| 12. .
Street A| Street B| 14. . etc.). Although, there may exist no connections at al l .
Your function should return the shor test path when the weights are added up from node to node from the first Node to the last Node in the
ar ray separated by dashes. The output for this ar ray should look l ike A-B-C-D-F-G. There wi l l only ever be one shor test path for the ar ray.
If no path between the first and last node exists, return -1. The ar ray wi l l at minimum have two nodes. Also, the connection A-B for
example, means that A can get to B and B can get to A.