another example of mergesort
 Dijkstra graph search algorithm