jressey / short_circuit_pathfinder

RPCFN #3 Short Circuit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

short_circuit_pathfinder

RPCFN #3 Short Circuit

Purpose of the app is to find the shortest path between two points through other points. Each point to point connection has a 'resistence' value. Short path is the path with the lowest total 'resistence' value

Input:

[ [ A, B, 50], [ A, D, 150], [ B, C, 250], [ B, E, 250], [ C, E, 350], [ C, D, 50], [ C, F, 100], [ D, F, 400], [ E, G, 200], [ F, G, 100], ]

Expected Output:

[ [ 'A', 'B', 50 ], [ 'B', 'C', 250], [ 'B', 'E', 250], [ 'C', 'E', 350], [ 'D', 'F', 400], [ 'E', 'G', 200], ]

About

RPCFN #3 Short Circuit


Languages

Language:Ruby 100.0%