This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- % cabal install PSQueue | |
-- % ghci Dijkstra.hs | |
-- > dijkstra sample A | |
-- [(A,0,A),(D,4,A),(E,7,D),(C,8,E),(B,9,E)] | |
module Dijkstra where | |
import Control.Applicative hiding (empty) | |
import Data.List (unfoldr) | |
import Data.Maybe (fromJust) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <assert.h> | |
#include <stdarg.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
enum type { | |
NIL, |