Professional Documents
Culture Documents
An Abstract Stack defined on objects which are linearly ordered by the programmer. A
new object placed into the stack is explicitly placed at the front of the stack while the
only defined removal is from the front of the stack. This ensures the behaviour that the
of any collection of objects inserted into the stack, the first that was inserted will also
be the first removed. This behaviour is sometimes called a last-in—first-out.
A N-ary heap is also possible with the same run times as a binary heap.
Another data structure similar to a leftist heap is a skew heap. While the
author has not investigated this, it has been claimed that skew heaps are
better on average than leftist heaps.