How Stack Overflow occur if we use linked list for stack implementation?
<p>I am new to stacks. As we know, if there is not enough space in stack and we want to push an element into the stack, then the stack will be in <strong>overflow</strong> state. This will occur when we will use array based implementation of stack because we have to define the capacity of the array. If we want to push an element exceeding the capacity, the overflow will occur but <strong>if we use linked list for stack implementation then how the stack overflow will occur?</strong> In linked list we need to not to define any capacity, it dynamically allocate memory for nodes. Please help me to recognize the issue. Thanks in advance.</p>