/elixir-skewheap

Primary LanguageElixirMIT LicenseMIT

Skewheap

tests

Skewheaps are fun, weird, priority queues that self-balance over time. Their structural depth is not guaranteed and individual operations may vary in performance. That said, its amortized performance is roughly O(log n) (source).

Skewheaps' most interesting characteristic is that they can be very quickly merged together non-destructively, creating a new, balanced heap containing all elements of the source heaps.

See Skew_heap on Wikipedia.

Installation

  1. Add skewheap to your project's dependencies
def deps do
  [{:skewheap, "~> 0.5.1"}]
end
  1. Install
$ mix deps.get

Documentation

API documentation available on https://hexdocs.pm/skewheap.