Questions tagged [linked-lists]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
56
votes
6answers
49k views

Floyd's Cycle detection algorithm | Determining the starting point of cycle

I am seeking help understanding Floyd's cycle detection algorithm. I have gone through the explanation on wikipedia (http://en.wikipedia.org/wiki/Cycle_detection#Tortoise_and_hare) I can see how the ...
5
votes
5answers
1k views

What precisely/concisely is the “head” of a singly linked list? I ask bc of ambiguity online

So I have a pic which I think illustrates my confusion: the read surrounds what I wonder is the head? Does head refer to a node with both a data and next, or only a node with next? In other words, ...
7
votes
2answers
803 views

Is a stack machine with a forward read iterator Turing complete?

It is well known that a machine with a single stack as only unlimited storage is not Turing complete, if it can only read from the top of the stack. I want a machine which is (slightly) more powerful ...
0
votes
1answer
338 views

What is `wasted space` parameter and why is it O(n) for a linked list

I'm reading a book on data structures and there is a comparison between linked list, array and dynamic array. The parameter name is wasted space. Here are the values: \begin{array}{cc} \text{...