ArrayList is based on an array. When deleting, the get position is O (1), and the delete complement is O (n).
LinkedList is based on a linked list, and when deleted, the location is O (n), and the deletion is O (1). The operation of
inserts is the same.
it doesn"t make any difference if you look at it this way. It is said in "Java data structure and algorithm" that using Iterator can solve the inefficient problem of LinkedList deletion operation.
Why is LinkedList more efficient? Why does Iterator save more time than traversing the linked list sequentially?