• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ArrayList and LinkedList

 
Tom Tang
Ranch Hand
Posts: 133
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the difference between ArrayList and LinkedList? If we don't care about speed, it seems to me that LinkedList can replace Arraylist anywhere. Is it also true vice versa? What standard can we use when deciding to use ArrayList or LinkedList?
 
George Toronto
Ranch Hand
Posts: 78
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my view, the different points are the following:
1)Positional access has constant time performance in ArrayList and VEctor, but linear time in LinkedList.
2)in most cases the primary implementation ArrayList is the best choice for implementing listd. Where frequent insertions and deletions occur inside a list, a LinkedList can be worth considering.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic