Inserts the specified element at the specified position in this list.
Inserts the specified element at the specified position in this list.Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).
For array lists adding to the end of the list has a time complexity of O(1), while adding to the beginning of the list has a time complexity of O(N) with N being the number of elements in the list.
For linked lists adding to beginning or the end of the list has a time complexity of O(1), while adding to a random position in the middle of the list has a time complexity of O(N) with N being the number of elements in the list.