tip
caution
LinkedList is faster than ArrayList while inserting and deleting elements, but it is slow while fetching each element.
- LinkedList is faster in add and remove compared to ArrayList. ArrayList is faster in get().
Elements to be added or removed are too large, go for LinkedList. Usage of get() is more, go for ArrayList. Again, if you don’t have element access in a large number, go for LinkedList.