answersLogoWhite

0


Best Answer

You can have as many as you can fit in memory, which is dependent on size of each node, OS, amount of RAM, etc.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

8y ago

There is no defined limit. The maximum limit is ultimately determined by available memory.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the maximum number of nodes that you can have on a stack linked list?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the front of the stack in a stacked linked list?

The top of a stack implemented as a linked list is the head of the list. All insertions and extractions occur at the head thus a forward list (singly-linked list) is sufficient to implement a stack.


Why stack is implemented by link list?

A Linked-List is basically a series of Nodes. Each Node contains two things: The contents, and the pointer to the next Node in the Linked-List. So you can traverse the Linked-List by following the "next" pointers in each Node, a bit like following road directions from city to city. A stack is an abstract data type where you have two operations: "push" and "pop". Pushing means to put an item in the stack, Popping means to get the first element of the stack. When you push an item onto a stack, you put the item at the top: so its like cutting in line to the very front. The last one in is now first, and thus, the first one out. Another helpful image is a "stack" of trays at a cafeteria -- you can only get the tray from the top of the stack, or put a tray on top of the stack. The very first tray in the stack is actually the one at the very bottom, and thus, the last one to be used. "First in, Last Out." A stack deals with what comes first/last, while a Linked-List describes how data is stored. A stack needs to store data, so a stack can be implemented as a Linked-List.


Are FIFO and LIFO forms of access used to add and remove nodes from queue?

No. FIFO is a first-in, first-out structure, and this describes how nodes are inserted and extracted from a queue. That is, new nodes are inserted at the back of the queue while existing nodes are extracted from the front of the queue. In other words, nodes are processed on a first-come, first-served basis. However, LIFO is a last-in, first-out structure and this describes how nodes are inserted and extracted from a stack. You can think of a stack as being like a stack of plates such that the top-most plate is always the first to be extracted while new plates are placed on top of existing plates. Stacks are typically used in backtracking algorithms because nodes are extracted in the reverse order they were inserted upon the stack.


Minimum size of stack to evaluate postfix expression?

Scan the postfix expression from left to right and count the number of values and the number of operators. The maximum value of their difference is the required stack size. Eg: 1 2 3 + 4 + * 1 2 3 2 3 2 1 The maximum is 3.


How do you copy all the elements from a given stack implemented in a linked list to a new one and returns the pointer to the new stack?

LIFO

Related questions

What is the front of the stack in a stacked linked list?

The top of a stack implemented as a linked list is the head of the list. All insertions and extractions occur at the head thus a forward list (singly-linked list) is sufficient to implement a stack.


Why stack is implemented by link list?

A Linked-List is basically a series of Nodes. Each Node contains two things: The contents, and the pointer to the next Node in the Linked-List. So you can traverse the Linked-List by following the "next" pointers in each Node, a bit like following road directions from city to city. A stack is an abstract data type where you have two operations: "push" and "pop". Pushing means to put an item in the stack, Popping means to get the first element of the stack. When you push an item onto a stack, you put the item at the top: so its like cutting in line to the very front. The last one in is now first, and thus, the first one out. Another helpful image is a "stack" of trays at a cafeteria -- you can only get the tray from the top of the stack, or put a tray on top of the stack. The very first tray in the stack is actually the one at the very bottom, and thus, the last one to be used. "First in, Last Out." A stack deals with what comes first/last, while a Linked-List describes how data is stored. A stack needs to store data, so a stack can be implemented as a Linked-List.


Are FIFO and LIFO forms of access used to add and remove nodes from queue?

No. FIFO is a first-in, first-out structure, and this describes how nodes are inserted and extracted from a queue. That is, new nodes are inserted at the back of the queue while existing nodes are extracted from the front of the queue. In other words, nodes are processed on a first-come, first-served basis. However, LIFO is a last-in, first-out structure and this describes how nodes are inserted and extracted from a stack. You can think of a stack as being like a stack of plates such that the top-most plate is always the first to be extracted while new plates are placed on top of existing plates. Stacks are typically used in backtracking algorithms because nodes are extracted in the reverse order they were inserted upon the stack.


Minimum size of stack to evaluate postfix expression?

Scan the postfix expression from left to right and count the number of values and the number of operators. The maximum value of their difference is the required stack size. Eg: 1 2 3 + 4 + * 1 2 3 2 3 2 1 The maximum is 3.


What is the maximum stack weight of a container on a ship?

123,854,956,596


How do you copy all the elements from a given stack implemented in a linked list to a new one and returns the pointer to the new stack?

LIFO


Is it possible to implement stack and queues using linkes list?

Yes it is possible to implement stack and queue using linked list


Where linked list using?

linked list are used for creation of stack,queues to use memory in optimum manner linked list are used as they are dynamic in nature


What are advantages of stack?

some disadvantages created in stack using array then that problem solve to linked list use in stack.First advantage for size of stack not limited in linked list using.second essay to stack programme implement using only one pointer.


What time required to insert element in stack with linked implementation?

O(1)


How does a linked list differ from stack and queue?

A linked list is a data structure that allows bi-directional traversal with constant-time access to both the head and the tail of the list. Elements may be pushed and popped from anywhere in the list. A stack is a structure where elements are pushed and popped only at the head of the stack. A stack is typically implemented using an array (either fixed-length or variable-length) where elements are pushed and popped from the end of the array (you need to keep track of where the last-used element is). However, a stack can also be implemented as a singly-linked list, pushing and popping at the head of the list. Stacks generally do not allow traversal of the elements.


Why is the constructor of the Stack Linked List class empty?

The default constructor of a stack is empty because the default value of any container, including a linked list, is an empty container which requires no arguments (all members default to zero).