Which data structure would you use to build a suffix tree in Elixir?

Thanks! I will checkout :digraph. Bit by bit, I am getting closer to the heart of this. I found an implementation by Danny Yoo in Racket (the actual code is here), which is starting to look a bit more complete (despite my ignorance of Racket itself). In the references, there is a book by Dan Gusfeld that appears to be the best available reference on the matter.

Gusfeld’s explanation of the algorithm is probably the most detailed one out there, and Yoo’s implementation is enough to convince me that this should be possible in Elixir. I need to take the time to fully grasp Yoo’s code, but it seems like the apparent branching architecture of the tree can be simulated by using labels that indicate the parent and children of each node. Walking the tree is then possible by referencing these labels.