This function builds heaps in linear time by iteratively merging larger and larger heaps.
1 | vector_to_heap(vec, empty_heap, empty_queue = empty_env_queue())
|
vec |
The vector to translate into a heap. |
empty_heap |
Empty heap for determing which heap implementation to use. |
empty_queue |
Empty queue to determing which queue implementation to use for building the heap. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.