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 can I add xml attributes to jaxb annotated class XmlElementWrapper?

I have a class with a XmlElementWrapper annotation like: ... @XmlElementWrapper(name="myList") @XmlElements({ @XmlElement(name="myElement") } ) private List<SomeType&…

xml annotations jaxb linked-list
Difference between a LinkedList and a Binary Search Tree

What are the main differences between a Linked List and a BinarySearchTree? Is BST just a way of maintaining a …

data-structures linked-list language-agnostic binary-search-tree
Deleting a middle node from a single linked list when pointer to the previous node is not available

Is it possible to delete a middle node in the single linked list when the only information available we have …

c data-structures linked-list
How to determine if a linked list has a cycle using only two memory locations

Does anyone know of an algorithm to find if a linked list loops on itself using only two variables to …

algorithm loops linked-list cycle
Linked List vs Vector

Over the past few days I have been preparing for my very first phone interview for a software development job. …

data-structures vector linked-list
Creating a copy constructor for a linked list

This is homework I'm working on implementing a linked list class for my C++ class, and the copy constructor has …

c++ linked-list copy-constructor
Why is inserting in the middle of a linked list O(1)?

According to the Wikipedia article on linked lists, inserting in the middle of a linked list is considered O(1). I …

linked-list big-o
Array-Based vs List-Based Stacks and Queues

I'm trying to compare the growth rates (both run-time and space) for stack and queue operations when implemented as both …

arrays data-structures stack queue linked-list
Is LinkedList thread-safe when I'm accessing it with offer and poll exclusively?

I have a linked list samples: protected LinkedList<RawDataset> samples = new LinkedList<RawDataset>(); I'm appending elements …

java multithreading list thread-safety linked-list
how to apply binary search O(log n) on a sorted linked list?

Recently I came across one interesting question on linked list. Sorted singly linked list is given and we have to …

algorithm data-structures linked-list binary-search asymptotic-complexity