I have searched around for this both on the Codecademy forums and on Google, but I haven’t been able to find a good answer. Perhaps I’m just not formulating my question well enough. Nevertheless, here it goes;
In the CS Path’s Linear Data Structures “Learn Stacks” quiz, one of the questions are whether a stack can be traversed. According to the quiz, they cannot. Conceptually, I understand the notion that stacks conform to a LIFO/FILO scheme, but I don’t understand how that makes them non-traversable in practice. In the “Stacks: Conceptual” lesson, they are even described as equal to a unidirectional linked list, just with different class methods. Linked lists can definitely be traversed.
So my question is this: how are nodes kept track of in stacks, if not via pointers in the containing nodes? How could a pop method be constructed if the nodes don’t link to each other? And if they are in fact linked, what makes a stack different from a linked list in practicality and why can’t we traverse it?