The linked-lists tag has no wiki summary.
1
vote
1answer
78 views
Complexity of algorithm inserting an element in a circular linked list at the front end
In a circular linked list, if an elements needs to be inserted at front [just before the node pointed by head], can be done in O(1) (see the answer here)
But in a book currently, I have, it is ...
5
votes
2answers
200 views
Implement queue with a linked list; why would it be bad to insert at the head and remove at the tail?
In my textbook, Data Structures and Algorithms in Java, the author says when implementing a queue using a linked list you choose the front of the queue to be at the head of the list, and the rear of ...
1
vote
0answers
49 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 ...
9
votes
0answers
123 views
Is there a data-structure which is more efficient than both arrays and linked lists? [duplicate]
Background:
In this question we care only about worst-case running-time.
Array and (doubly) linked lists can be used to keep a list of items and implement the vector abstract data type. Consider the ...