answersLogoWhite

0

AllQ&AStudy Guides
Best answer

_ _ _ _ them all!

This answer is:
Related answers

_ _ _ _ them all!

View page

Traversing a doubly linked list is generally faster than traversing a singly linked list, but the speedup depends on how you do the traversal:

  • Traversing from first to last node: No difference.
  • Random access: Doubly linked list is faster, the difference is a fixed factor. (Like twice as fast. Which makes it still very slow for random access compared to arrays.)
  • Reverse order: Doubly linked list is just as fast traversing "backwards" as "forwards", while a singly linked list traversing in reverse order needs to traverse the entire list once for every element in the list - it is a LOT slower. (Time complexity O(n) for doubly linked list, O(n*n) for singly linked, if you are familiar with the notation.)
If you are talking about the computer science "big O notation", doubly linked and singly liked lists are the same. This is because the Big O notation ignores fixed factors and only looks at how time increases with the length of the list, and in this respect the two are the same. (Except for the special case of traversing the list in reverse order. Even here a singly linked list could do it in O(n) time - same as a doubly linked list - by reversing the list (O(n)) before traversing it (O(n)) for a total time of 2*O(n), which by the rules of Big O is the same as O(n).)
View page

you do anything with binary element that is traversing. insertion,deletion, accesing anything.............

View page

If you don't already have a reference to the node, there is no way to avoid traversing the list to find it.

View page

In depth first traversing, the node that is below the current node is considered first. For breadth first traversing, the node to the rightmost of the current mode is considered.

View page
Featured study guide

The Dutch claim in the new world was established at

In the Preamble to the Declaration of Independence Thomas Jefferson stated that natural rights of people included life liberty and

Prince Henry the navigator is known for

The Aztec Empire of King Montezuma was invaded and destroyed by

➡️
See all cards
2.0
1 Review
More study guides
No Reviews

No Reviews
Search results