r/javahelp • u/LFrancis • 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
3
u/fuqqboi_throwaway Apr 30 '20
I'm currently reading Programming Interviews Exposed and am on the part going over LinkedLists. They do mention it's mainly for C++ but I figure it's helpful to know. Should I not even bother remembering any of the java stuff related to it then since it would always be better to use ArrayList if I was in a Java interview anyway? And just focus on using LinkedList if it's a C++ interview?