Programming, Java, Lists, Data Structures.
index value. If the index is less then half the size then it starts from the start or else the end. Conclusion ArrayList and Vector add elements at O(n) but fetches element at O(1), while LinkedList adds elements at O(1) but fetches element at O(n). These data structures are meant to be used in