doubly-linked-list Questions
6
I don't understand difference between a double-ended and doubly-linked list.
What is the major difference between the two?
Ellswerth asked 4/2, 2015 at 19:24
9
Why is the time complexity of node deletion in doubly linked lists (O(1)) faster than node deletion in singly linked lists (O(n))?
Upali asked 13/12, 2009 at 6:46
5
Solved
According to Bjarne Stroustrup's slides from his Going Native 2012 keynote, insertion and deletion in a std::list are terribly inefficient on modern hardware:
Vector beats list massively for i...
Cleliaclellan asked 8/12, 2012 at 17:6
14
This question was asked in a recent coding interview.
Q : Given a binary tree, write a program to convert it to a doubly linked list. The nodes in the doubly linked list are arranged in a sequenc...
Brigid asked 16/7, 2012 at 20:18
4
Solved
When does using a doubly linked list seem to be best option in real life scenario? Can someone suggest practical use of it?
Kwakiutl asked 17/11, 2016 at 17:47
5
Solved
So recently, I had read an article that showed me how to implement a doubly-linked list with just a single pointer field, i.e, like a single linked list. Something to do with storing the XOR prev a...
Brade asked 3/2, 2014 at 13:17
11
Solved
Yes, this is an old topic, but I still have some confusions.
In Java, people say:
ArrayList is faster than LinkedList if I randomly access its elements. I think random access means "give m...
Invalid asked 18/5, 2012 at 16:35
8
Solved
On CLRS's textbook "Introduction to Algorithm", there's such paragraph on pg. 258.
We can delete an element in O(1) time if the lists are doubly linked. (Note that CHAINED-HASH-DELETE takes as inp...
Dogleg asked 12/11, 2011 at 16:45
3
Solved
Is it possible to have a doubly linked list in Haskell, and what's the ideal solution to implementing them? I'm implementing a scene graph where every widget has a parent as well as a child, and it...
Dangle asked 30/4, 2012 at 15:52
5
Solved
A linear data structure traverses the data elements sequentially, in which only one data element can directly be reached. Ex: Arrays, Linked Lists.
But in doubly linked list we can reach two data ...
Hawkinson asked 27/5, 2015 at 15:8
2
Solved
I'm studying sys/queue.h from FreeBSD and I have one question:
In sys/queue.h, LIST_ENTRY is defined as follows:
#define LIST_ENTRY(type) \
struct { \
struct type *le_next; /* next element */ \
...
Sinuosity asked 8/5, 2013 at 12:23
3
Solved
I want to implement the QuickSort Algorithm on a sync Doubly Linked List.
I give the function "partition" the left and right border, then it starts to search lower values on the left side and put t...
Detrude asked 30/4, 2013 at 14:48
3
Solved
Anyone suggest an implementation? I tried this at home the other day and discovered the move semantics too difficult to establish a prior link or a simple linked list. Easy if making a tree using s...
Comedic asked 13/3, 2013 at 11:47
1
Solved
I have some degenerate tree (it looks like as array or doubly linked list). For example, it is this tree:
Each edge has some weight. I want to find all equal paths, which starts in each vertex.
...
Hadria asked 15/5, 2015 at 22:39
3
Solved
I've a three dimensional structure ... actually a doubly linked list with six nodes i.e. left, right, up, down, in, out. if one node is on the right side of other then that node will be defiantly o...
Alphanumeric asked 8/6, 2014 at 11:37
1
Solved
The other day my professor in my data structures course (Java) said, "okay guys, how can we clear this n element doubly linked list from memory? ". I uttered out loud "set the head and tail to null...
Giselle asked 15/3, 2014 at 21:5
1
Solved
I've heard that it's possible to implement binary search over a doubly-linked list in O(n) time. Accessing a random element of a doubly-linked list takes O(n) time, and binary search accesses O(log...
Flense asked 23/10, 2013 at 23:51
6
Solved
I am trying to design a program that takes in data from a file, after which it gives numbering to unique data, linked list also contains parent and child lists.
Data structure:
____A
/ |
B C ...
Blurt asked 9/8, 2013 at 5:21
1
Solved
Background
I'm having a tree structure. Within this tree structure I am maintaining kids of a node as a doubly-linked list:
(source: Doubly linked list)
(I chose this structure due to bre...
Chev asked 5/8, 2013 at 21:58
7
Solved
I have been working on a project where I must implement a java class that implements the use of doubly linked lists. I have the LinkedList class finished with all my methods. I'm just unsure how to...
Efface asked 7/3, 2013 at 22:26
1
Solved
I'm wondering what the order of complexity for a Python v2.7 list being built up using append() is? Is a Python list doubly linked and thus it is constant complexity or is it singly linked and thus...
Note asked 27/2, 2013 at 20:37
1
Solved
I build a std::list of items (graph component structures) which are periodically merged together. The idea is if I discover a node connecting two components they become one single component and my ...
Damselfly asked 20/12, 2012 at 6:24
3
Solved
I have a list of lists like this:
std::list<std::list<double> > list;
I filled it with some lists with doubles in them (actually quite a lot, which is why I am not using a vector. A...
Slotter asked 5/9, 2012 at 11:38
1
© 2022 - 2024 — McMap. All rights reserved.