Consider the efficiency of locating the kth element in a doubly-linked list of length n. If k

Question:

Consider the efficiency of locating the kth element in a doubly-linked list of length n. If k > n/2, it is more efficient to start at the end of the list and move the iterator to the previous element. Why doesn’t this increase in efficiency improve the big-Oh estimate of element access in a doubly-linked list?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question

Big Java, Enhanced Early Objects

ISBN: 9781119499091

7th Edition

Authors: Cay S Horstmann

Question Posted: