vector

Showing posts with label vector. Show all posts
Showing posts with label vector. Show all posts

ArrayList vs LinkedList vs Vector


ArrayList vs LinkedList vs Vector 


ArrayList
LinkedList
Vector
Data structureIndex-based  dynamic arrayDoubly linked listGrowable array
Increment size50%No initial size100%
Traverse Uses iteratorUses iteratorUses enumeration
Memory usageLess memory usageMore memory usage
AccessibilityRandom and fastSequential and slowRandom and fast
OrderInsertion orderInsertion orderInsertion order
DuplicatesAllowAllowAllow
Insert / DeleteSlowFastSlow
SynchronizedNoNoYes
ImplementsRandomAccess interfaceNA
RandomAccess interface &
Serializable interface
Null valuesYesYesYes