Junior
What is the access speed to the last element in ArrayList?
sobes.tech AI
Answer from AI
O(1).
Thanks to the internal structure based on a dynamic array, access to any element by index (including the last) occurs in constant time. The address of the element is calculated using the formula: start_address_of_array + index * size_of_element.