0
$\begingroup$

How can a directed graph be efficiently represented in a purely functional language like Haskell? Could someone suggest relevant materials on this topic? (functional pearls perhaps?) Thanks.

$\endgroup$
1

1 Answer 1

1
$\begingroup$

There are many reasonable approaches, but one is an adjacency list representation. You can use any convenient data structure for the adjacency list; I anticipate that a dictionary (ordered map) will be useful.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.