Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 1.17 KB

README.md

File metadata and controls

34 lines (25 loc) · 1.17 KB

Trees

Trees.AdjacencyList
This is a implentation of an basic hireachical data structure you might see in an sql database, backend is powered by a linked-list and all traversal functions happen on this list.

This will obviously not be a very optimal solution, but fine when the data sets are small enough.

Id ParentId Name
0 nil a
1 0 b
2 1 c

** Traversal **
Basic algorithms to traverse the list are available including,

Installation

If available in Hex, the package can be installed by adding trees to your list of dependencies in mix.exs:

def deps do
  [{:trees, "~> 0.1.0"}]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/trees.