thhh
04/07/2021, 2:03 PMRoukanken
04/07/2021, 3:01 PMList<T>
can't be said to be an random access structure
There are several different implementations of this interface, notably ArrayList<T>
(random access) and LinkedList<T>
(NOT random access - `get(i)`/`[i]` are linear in time for linked list)Michael Böiers
04/07/2021, 3:38 PMRandomAccess
which you can use to check whether a list supports fast index based access.ephemient
04/07/2021, 3:50 PMMichael Böiers
04/07/2021, 3:52 PMephemient
04/07/2021, 3:52 PMnanodeath
04/07/2021, 3:58 PM