val initialWeights = map (fn (t, _) => (t, 0)) graph
fun sortWeights weights = (* Sort the weights such that the largest is at left, ready to be grabbed. *)
ListMergeSort.sort (fn ((_, a), (_, b)) => a < b) weights
val initialWeights = map (fn (t, _) => (t, 0)) graph
fun sortWeights weights = (* Sort the weights such that the largest is at left, ready to be grabbed. *)
ListMergeSort.sort (fn ((_, a), (_, b)) => a < b) weights