Second fastest arrival
A city has n intersections numbered 0 to n - 1. Each entry of roads is [u, v, minutes]: a two-way road between u and v that takes minutes to drive. A route from 0 to n - 1 may pass through the same intersection or road more than once. Return the second best arrival time: the smallest route time that is strictly greater than the fastest one. Return -1 if n - 1 cannot be reached.
n ≥ 2; every road takes at least 1 minute, no road joins an intersection to itself, and two intersections may be joined by several roads.
Besides the tests, one large input (24 intersections in a ladder) with a ~100 ms limit (scaled to your device's speed): brute force won't pass.
Examples
second_fastest(4, [[0,1,2],[1,3,2],[0,2,3],[2,3,2]])→5second_fastest(2, [[0,1,5]])→15second_fastest(3, [[0,1,1]])→-1