Project Euler 83 - Path sum: 4 ways

Official link: https://projecteuler.net/problem=83

NOTE: This problem is a significantly more challenging version of Problem 81

Thought Process

Was stumped on this one for a long time, I was always wondering how to handle so many degrees of freedom using dynamic programming, but after taking a break I realised that I don't need to use dynamic programming, this problem perfectly suits the application of Dijkstra's algorithm. 

I then decided to try to code my own version of Dijkstra's algorithm and i'm very proud that it worked! A more general Dijkstra's algorithm is available in my essential functions

Interactive Code

No interactive code, my code is included below