0

I came across this sentence in Tech article which describes a feature of List element:

Accessing elements is very fast near the extremes of the list

What does near the extremes mean in this sentence?

  • Extreme: 'furthest from the centre or a given point' – marcellothearcane Mar 2 at 19:38
1

as far as i can tell this must come from a programming context and near the extremes may from my understanding only mean near the outer boundaries:

reason:

in programming a list could be represented with Arrays.

at least in c Arrays are just pointers to the first Array element.

accessing the first element is therefor very fast (no Need to add an Offset to the address of the list to get to the list element's address before dereferencing the pointer)

why accessing the say last element should be fast as well i can not tell may be a feature of the language used. why accessing the say 3rd list element should be easy (in say a 50 List-Elements long list ) should be fast as well i can only wonder About (Maybe a Thing with caches)

where as i can understand that accessing the say 25th list element may require a) math to get to the address and b) may require a read from Memory because of a so called Cache-miss. this then takes compareably longer … Hope this answers the Question.

0

Here, "extreme" means end point. There are two extremes in the case of a linked list: the beginning and the end.

I'm sorry, but I have not found a dictionary definition to document this.

I think the sentence makes the most sense if it's a "doubly linked list, ... sometimes also referred as bi-directional linked list since it allows traversal of nodes in both directions" (https://codeforwin.org/2015/10/doubly-linked-list-data-structure-in-c.html).

It takes more steps to get to the middle of the list, than to retrieve the first couple of elements or the last couple of elements.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.