r/javahelp • • Apr 30 '20

ArrayList vs LinkedList

So I understand that for different situations, either the ArrayList API or the LinkedList API will be more efficient. So what should I look for in terms of design that will tell me which one of those structures is recommended? Is it more related to preference rather than specific uses?

Thanks!

17 Upvotes

22 comments sorted by

View all comments

1

u/chubbasnorlax Apr 30 '20

If you make your own hash table, queue or stack you need a linked list. You can also use a linked list for making a tree or graph but there are preferred methods.