It is a linear data structure and it's mainly used to store similar data. An array is a particular method of storing elements of indexed data. Elements of data are stored sequentially in blocks within the array. Each element is referenced by an index, or subscript. Arrays can also be multidimensional - instead of accessing an element of a one-dimensional list, elements are accessed by two or more indices, as from a matrix or tensor. The index is usually a number used to address an element in the array (Russell, 2010).
Heap
In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if B is a child node of A, then key(A) = key(B). This implies that an element with the greatest key is always in the root node, and so such a heap is sometimes called a max-heap. (Alternatively, if the comparison is reversed, the smallest element is always in the root node, which results in a min-heap.) There is no restriction as to how many children each node has in a heap, although in practice each node has at most two (Russell, 2010).
Stack
A stack is a data structure that allows data to be inserted (a 'push' operation), and removed (a 'pop' operation). Many stacks also support a read ahead (a 'peek' operation), which reads data without removing it. A stack is a LIFO-queue, meaning that the last data to be inserted will be the first data to be removed (Russell, 2010). When we insert data into a stack, it is placed at the head of a queue. This means that when we remove data, it will be in reverse order. Adding 1,2,3,4 will return 4,3,2,1. Stacks aren't the most frequently used data structure, but they are extremely useful for certain tasks.
3
2
1
4
3
2
1
Figure 1. Stack before push operation, and stack after
4
3
2
1
3
2
1
Figure 1. Stack before pop operation, and stack after
Queue
Queues provide services in computer science, transport, and operations research where various entities such as data, objects, persons, or events are stored and held to be processed later. In these contexts, the queue performs the function of a buffer. Queues are common in computer programs, where they are implemented as data structures coupled with access routines, as an abstract data structure or in object-oriented languages as classes (Russell, 2010). Common implementations are circular buffers and linked lists
Deque
Deque is the data structure that supports insertion and deletion of object on front and rear end of the queue. Deque operation is richer than stack or queue, Abstract Data Type of deque are as follows:
insertFirst(e) - Insert a new element at the front end of deque.
insertLast(e) - Insert a new element at the rear end of ...