Harman Patil (Editor)

Pile (abstract data type)

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Pile (abstract data type)

In computer science, a pile is an abstract data type for storing data in a loosely ordered way. There are two different usages of the term; one refers to an ordered deque, the other to an improved heap.

Contents

Ordered deque

The first version combines the properties of the deque and a priority queue and may be described as an ordered deque.

An item may be added to the head of the list if the new item is valued less than or equal to the current head or to the tail of the list if the new item is greater than or equal to the current tail. Elements may be removed from both the head and the tail.

Piles of this kind are used in the "UnShuffle sort" sorting algorithm.

Improved heap

The second version is a subject of patents and improves the heap data structure.

The whole Data Pile-based system can be generalized as shown:

References

Pile (abstract data type) Wikipedia