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.

How to create deep copy of Linked List that maintain same order

I got asked the following question at a job interview that I could not figure out. You are given a …

java data-structures linked-list singly-linked-list
Array of Linked Lists in C: initializing and inserting?

I need to create an array of linked lists (as pictured) and this is what I've made so far: typedef …

c arrays linked-list singly-linked-list
Efficient linked list in C++?

This document says std::list is inefficient: std::list is an extremely inefficient class that is rarely useful. It performs …

c++ stl linked-list dynamic-memory-allocation abstract-data-type
Adding data in linked list using for loop

I want to add data into a linked list using for loop. what i expect is 1 2 3 4 5 6 7 8 9 10 O/P i'm getting …

c++ for-loop data-structures linked-list singly-linked-list
'Multipurpose' linked list implementation in pure C

This is not exactly a technical question, since I know C kind of enough to do the things I need …

c linked-list containers generic-programming
synchronized LinkedList - peek

A LinkedList has convenient peek, pop, ... methods. Unfortunately, I need a thread-safe LinkedList. So, my first idea was to wrap …

java linked-list thread-safety peek
Help with Circular Linked List in Python

I'm trying to make a circular singly linked list. I'd like to be able to modify my code for a …

python linked-list circular-list
Cycle detection in linked list with the Hare and Tortoise approach

I understand that in order to detect a cycle in a linked list I can use the Hare and Tortoise …

algorithm linked-list detection cycle floyd-cycle-finding
best linked list in ruby WITHOUT extending array?

What is the best way to implement a linked list in Ruby without using/extending the Array class? This is …

ruby data-structures linked-list singly-linked-list
Test if single linked list is circular by traversing it only once

I am a fresher and I was asked this question in a recent interview I gave. The question was --- …

algorithm linked-list circular-list