Top "Linked-list" questions

A linked list is a data structure where the list elements are not necessarily stored sequentially but rather each element contains a reference to the next (and optionally the previous) element in the list.

Why is deleting in a single linked list O(1)?

I do not quiet understand why deleting at the end of a single linked list goes in O(1) time, as …

data-structures linked-list singly-linked-list
Linked list vs. dynamic array for implementing a stack

I've started reviewing data structures and algorithms before my final year of school starts to make sure I'm on top …

performance data-structures stack linked-list dynamic-arrays
Under what circumstances are linked lists useful?

Most times I see people try to use linked lists, it seems to me like a poor (or very poor) …

language-agnostic data-structures linked-list
Java - PriorityQueue vs sorted LinkedList

Which implementation is less "heavy": PriorityQueue or a sorted LinkedList (using a Comparator)? I want to have all the items …

java sorting linked-list priority-queue
LinkedList checkForComodification error java

Ok so what I am trying to do here is to have a method "running" a process for a given …

java linked-list concurrentmodification
Best way to store Country codes, names, and Continent in Java

I want to have a List or Array of some sort, storing this information about each country: 2 letter code Country …

java arrays linked-list hashmap treemap
Linked list recursive reverse

I was looking at the code below from stanford library: void recursiveReverse(struct node** head_ref) { struct node* first; struct …

c algorithm recursion linked-list reverse
Using pointers to remove item from singly-linked list

In a recent Slashdot Interview Linus Torvalds gave an example of how some people use pointers in a way that …

c pointers linked-list
Doubly Linked List Template Copy Constructor Assignment Operator

I wrote a simple implementation of doubly linked list in C++ using templates. However, I have some problems with copy …

c++ templates linked-list doubly-linked-list
Real life use of doubly linked list

When does using a doubly linked list seem to be best option in real life scenario? Can someone suggest practical …

data-structures linked-list doubly-linked-list