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.

Increment operator/ iterator implementation

I am trying to figure out a couple of things here: How do I write an increment operator for a …

c++ iterator linked-list post-increment
strategies to reverse a linked list in JavaScript

I just struggled through a simple interview question: Please reverse a singly linked list. While I failed to provide a …

javascript linked-list singly-linked-list
What are real world examples of when Linked Lists should be used?

Another programmer was mentioning that they haven't found a use case for using a linked list data structure in any …

c# java data-structures linked-list
Algorithm for Shuffling a Linked List in n log n time

I'm trying to shuffle a linked list using a divide-and-conquer algorithm that randomly shuffles a linked list in linearithmic (n …

algorithm linked-list shuffle divide-and-conquer
Explanation of code (linked list C)

This is not my code. I took this code off this website: http://www.macs.hw.ac.uk/~rjp/Coursewww/…

c linked-list head
Is Linked List an ADT or is it a Data Structure, or both?

If I use the standard definition of an Abstract Data Type as a black box that provides some functions to …

arrays data-structures linked-list abstract-data-type
Is a Linked-List implementation without using pointers possible or not?

My question is very simple, can one using C++, implement a link-list data structure without using pointers (next nodes)? To …

c++ pointers linked-list
How can I reverse a linked list?

Consider: Node reverse(Node head) { Node previous = null; Node current = head; Node forward; while (current != null) { forward = current.next; current.…

java algorithm data-structures linked-list singly-linked-list
Why is a LinkedList Generally Slower than a List?

I started using some LinkedList’s instead of Lists in some of my C# algorithms hoping to speed them up. …

c# .net performance list linked-list
atomic swap with CAS (using gcc sync builtins)

Can the compare-and-swap function be used to swap variables atomically? I'm using C/C++ via gcc on x86_64 RedHat Linux, …

c++ gcc linked-list atomic compare-and-swap