Skip to content
Test implementation of lazy heap sort in Clojure
Clojure
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
src/heap_sort
test/heap_sort/test
.gitignore
README.org
project.clj

README.org

Heap sort

This is an implementation of the heap-sort algorithm in pure Clojure. As opposed to the standard sort algorithm in Clojure (which is inherited from Java), it returns a lazy sequence of sorted elements. Thus, it should be theoretically faster than sort if only a small number of elements from the start of the sorted sequence are used.

Tests are given showing that this is the case for large inputs. They also show that it is not much slower than sort for large inputs.

License

Copyright (C) 2011 Chris Gray.

Distributed under the same license as Clojure.

Something went wrong with that request. Please try again.