Computer Science Homework Help
Computer Science Homework Help. Datatypes and Recursion: Binary Heaps (in haskell programming language)
In this task we will improve our implementation of binary heaps
Recall that a binary heap is a binary tree with two additional properties:
- Shape property: all levels of the tree, except possibly the last one (deepest) are fully filled, and, if the last level of the tree is not complete, the nodes of that level are filled from left to right.
- Value property: the key stored in each node is
>=
the keys of its children.
Computer Science Homework Help