Generic Heap

Similar to the Priority Queue implemented in the C++ STL Library.