When to use ArrayList and when to use LinkedList in application?
ArrayList has constant time search operation O(1) .Hence, ArrayList is preferred when there are more get() or search operation .
Insertion , Deletion operations take constant time O(1) for LinkedList. Hence, LinkedList is preferred when there are more insertions or deletions involved in the application.
Insertion , Deletion operations take constant time O(1) for LinkedList. Hence, LinkedList is preferred when there are more insertions or deletions involved in the application.
Comments
Post a Comment