answersLogoWhite

0

Stack and Queue have elements enter and leave frequently, and the total number of elements within the container (the stack or the queue) may be unpredictable. That is, the size of the container may be 0 or very huge.

Array is a fixed size collection. When adding an element, if the array is already full, it cannot simply add another "slot" to hold the new entry. The program must create another array instance that is big enough to hold the original elements and the new comers, which means all the elements must be "moved" from the current array to the newly created one.

Linked list has the advantage of easily adding and removing a node (to hold an element) and keep the ones already in the list untouched.

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Engineering

Is String a linear data structure?

yes it is, other linear data structures are lists,queues,stacks,arrays


How do you determine symmetry of a data structure For example how do you know if a Stack or a queue or a priority queue or a double ended queue are symmetric?

You can determine symmetry of a data structure in two ways. One is when the stacks and queues data are put in the application and when the stacks are put in during run-time.


How do you implement queue using stack in c plus plus?

A queue in any language is a singly-linked list structure that permits new data to be inserted only at the end of a list while existing data can only be extracted from the beginning of the list. Queues are also known as a first in, first out (FIFO) structure. Unlike a standard singly-linked list, the list maintains a pointer to the last node as well as the first, in order to insert new data and extract existing data in constant time. Variations on the queue include the priority queue which permit data to be weighted, such that data with the greatest priority is promoted to the front of the queue, behind any existing data with the same or higher priority, using an insertion sort technique. Insertion is therefore achieved in linear time rather than constant time, however extraction is always in constant time.


What is Linear and non linear list in data structure?

Linear : Traversal is linear .. ex: array,linked lists,stacks,queues NoN-linear: Traversal is not linear.. ex:trees,graphs imagine the situation of searching of particular element..in above scenarious..then u will understand easily.. Linear : Traversal is linear .. ex: array,linked lists,stacks,queues NoN-linear: Traversal is not linear.. ex:trees,graphs imagine the situation of searching of particular element..in above scenarious..then u will understand easily.. Linear : Traversal is linear .. ex: array,linked lists,stacks,queues NoN-linear: Traversal is not linear.. ex:trees,graphs imagine the situation of searching of particular element..in above scenarious..then u will understand easily..


What is data structure?

The data structures are user defined data types specifically created for the manipulation of data in a predefined manner. Examples of data structures would be stacks,queues,trees,graphs and even arrays(also reffered as data structure)

Related Questions

What are the advantages and disadvantages of stacks?

Stacks are advantageous in enabling simple backtracking algorithms. That is the sole purpose of a stack, so there are no disadvantages as such.


Is String a linear data structure?

yes it is, other linear data structures are lists,queues,stacks,arrays


Describe the advantages and disadvantages of array in data structure?

Array Pros:can access any element of an array directlycan be used to create other useful data structures (queues, stacks)light on memory usage compared to other structuresArray Cons:rigid structurecan be hard to add/remove elementscannot be dynamically resized in most languages


How do you determine symmetry of a data structure For example how do you know if a Stack or a queue or a priority queue or a double ended queue are symmetric?

You can determine symmetry of a data structure in two ways. One is when the stacks and queues data are put in the application and when the stacks are put in during run-time.


Differences between stacks and qeues?

stacks work in by the process of (LIFO) last in first out. While queues use the process of (FIFO) first in first out.


What are the advantages and disadvantages of free weights compared to stacks?

Free weights works all of your muscles, but are very bulky and heavy to keep around.


How do you implement queue using stack in c plus plus?

A queue in any language is a singly-linked list structure that permits new data to be inserted only at the end of a list while existing data can only be extracted from the beginning of the list. Queues are also known as a first in, first out (FIFO) structure. Unlike a standard singly-linked list, the list maintains a pointer to the last node as well as the first, in order to insert new data and extract existing data in constant time. Variations on the queue include the priority queue which permit data to be weighted, such that data with the greatest priority is promoted to the front of the queue, behind any existing data with the same or higher priority, using an insertion sort technique. Insertion is therefore achieved in linear time rather than constant time, however extraction is always in constant time.


What is Linear and non linear list in data structure?

Linear : Traversal is linear .. ex: array,linked lists,stacks,queues NoN-linear: Traversal is not linear.. ex:trees,graphs imagine the situation of searching of particular element..in above scenarious..then u will understand easily.. Linear : Traversal is linear .. ex: array,linked lists,stacks,queues NoN-linear: Traversal is not linear.. ex:trees,graphs imagine the situation of searching of particular element..in above scenarious..then u will understand easily.. Linear : Traversal is linear .. ex: array,linked lists,stacks,queues NoN-linear: Traversal is not linear.. ex:trees,graphs imagine the situation of searching of particular element..in above scenarious..then u will understand easily..


What is the need of dequeue?

A deque, or double-ended queue, is a versatile data structure that allows insertion and deletion of elements from both ends, making it useful for various applications. It supports operations like adding or removing elements efficiently from either front or back, which is beneficial for scenarios such as implementing queues, stacks, or maintaining a sliding window over a dataset. Deques provide greater flexibility than traditional queues or stacks, enabling more complex data management and algorithm implementations.


What is data structure?

The data structures are user defined data types specifically created for the manipulation of data in a predefined manner. Examples of data structures would be stacks,queues,trees,graphs and even arrays(also reffered as data structure)


Which data structure is best suited for the undo operation in windows?

Stacks


Examples of primitive and non primitive scheduling?

The latter isn't primitive. Most likely it means 'non trivial', 'adaptive' or 'sophisticated'.