Sequential access means that the cost of accessing the 5th element is 5 times higher than the cost of accessing the first element, or at least increases the costs associated with the position of the elements in the set. This is due to the fact that to access the 5th element of the set, you must first perform an operation to search for the 1st, 2nd, 3rd and 4th elements, therefore, to access the 5th element, 5 operations are required.
Random access means that access to any element in the set has the same cost as any other element in the set. Finding the 5th set item is just one operation.
, O (1), O (n/2) → O ( n) . N/2 , , 100 , . , n , n/2 ( O n).
-, :
Hashmaps - , . , - - . , , 100% - -, .
-, , :

, - - O (n) , , , , - - Ω (n), O (1) Θ (1). Ω - , Θ - , O - .
:
. n - Ω (n), O (n/2) Θ (1), Ω (n), O (n) Θ (1).
. n - Ω (n/2), O (1) Θ (1), Ω (n), O (1) Θ (1)
, , .
@sumsar1812:
, , / , , . , , , .
, .
, .
int 8 , , :
int someInts[5];
someInts[1] = 5;
someInts - , . 1 , 8 .
(someInts+1)*
, , , .
, . , , .
, , . , , , . , , , .
, , , .
, , , , , , . , , .