Are Stacks and Queue considered LinkedList?
The time complexity of indexing a LinkedList is 0(n). So am I right to assume that's the same for stacks and queues.
1 Replies
I have started learning Data Structures recently and just had my own linked list implementation.
Now I stumbled upon two new data structures: stack and queue.
From what I have learned so far
stack is a linked list that allows insertion/removal only from its tail, and
the queue is a linked list that allows insertion only at its tail and removal only from its head.