answersLogoWhite

0


Best Answer

A stack is a linear last-in first-out list type data structure. Several implementations are possible. Two examples are the array and the linked list.

The array is quick, but is limited in size.

The linked list requires overhead to allocate, link, unlink, and deallocate, but (except for total available memory) is not limited in size.

One compromise might be a linked list of arrays. Another compromise might be to not necessarily unlink and delete when an element is popped off the stack.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the Data structures used for stack?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What do an array and a stack have in common?

Both are linear data structures.


Which of the data structures is most efficient in terms of both space and time to reverse a string characters?

stack


What data structures is most efficient in terms of both space and time to reverse a string of characters?

Stack


Is stack a physical data structure?

Traditional implementations of stacks, particularly those implemented in hardware, are generally physical data structures. That is, the data structure dictates how elements are arranged in memory.Modern software implementations take a more abstract approach however. Characteristic for a stack is not the physical arrangement of items in memory, but the set of characteristic operations and their behavior: a simple stack can execute push operations to add an item and pop operations to remove the most recently added item. More advanced stacks support additional stack operations to manipulate implicitly addressed stack elements, for example though common operations such as dup, swap, drop.Nothing in the behavior of these stack operations dictate that the stack shall be implemented as a physical data structure; in fact many modern runtime kits use higher order data structures such as linked lists to implement stacks and other basic data structures. Such a choice would be made to support an infinite size stack, for example, and in order to base the runtime kit on the smallest number of fundamental tools in order to promote robustness.


Why stack data starts from one location less then stack pointer's register address?

Actually, stack data starts one location greater than the stack pointer. In the Intel design, the stack pointer always points to the next location to be used on a push, and pushes always decrement the pointer. It is more correct to say that the stack region to be used next is one location less than the stack pointer's register address.


Which type of data structure is used in ATM to take the printout of last 5 transactions?

stack data structure.


What are data structures and algorithms used for?

Data structures are a way of storing and organizing data on a computer so that it can be used in a way that is most efficient and uses least resources. Algorithms are step by step processes for calculations which are used for data structures.


Which data structures used in T9 dictionary?

Tries, it is a kind of tree data structure that can be used.


Is a linked list a physical data structure?

Physical data structures are how data is organized on a hardware storage device, and therefore how they appear to the computer. Logical or virtual data structures are software-based objects, and how the user or program sees it. Although many file systems use a type of linked list format for storing information, a linked list is used for both hardware and software purposes, and therefore it cannot fall under either the physical or virtual data structure classification.


How can you add different type of data in a stack?

stack is a linear data structure in which data item is either inserted or deleted at one end there are mainly two operations performed on stack.they're push poppush:writing a value to the stack is push or moving the stack pointer up to accomodatethe new item. pop:reading a value from stack or moving the stack pointer down.


Can stack be called fifo data structure?

No. A stack is a LIFO (Last In First Out) data structure.A queue is a FIFO (First In First Out) data structure.


What data structures are used for implementing backtracking branch and bound?

Recursion is used for backtracking