HackerRank - BotCleanLarge - half-working MST-based solution

This commit produces a solution that passes games 1 and 3 and fails
games 2 and 4. It is based on determining a minimum spanning tree
(using Prim's algorithm) and then walking along the Hamiltonian path
produced by the MST algorithm.

It could be a time-based failure as I re-calculate the MST on every
iteration of the game. It's completely unclear if I'm allowed to cache
the results of the MST calculation.