A
A
Apexis2019-07-27 18:47:41
Arrays
Apexis, 2019-07-27 18:47:41

How does the server find the requested file?

When requesting, for example, an html file, does the server or OS look for the file in a loop, sorting through their names, or does it immediately take the right one? Is it the same story with arrays? For example, to get to the 11th element, all the previous ones are looked through?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Romashkan, 2019-07-27
@Apexis

When requesting, for example, an html file, the server or OS looks for the file in a loop

Why, if there is a way?
In a linked list - yes, by enumeration. In a hash table, usually without enumeration, i.e. in O(1) on average (assuming no collisions). Depends on the algorithm.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question