Need Assistance?

support@tutorialshub.in

Java Collections Framework

ArrayList vs LinkedList (Internal Working)

ADVERTISEMENT
Java Free Lesson
5 min read
ADVERTISEMENT
  • ArrayList: Backed by a dynamic resizable array. Random access get(index) is O(1); inserting/deleting in the middle is O(n). Best choice 95% of the time.
  • LinkedList: Doubly-linked list. Fast O(1) insertions/deletions at both ends, but get(index) is O(n) and uses more memory per node.
ADVERTISEMENT
Hi, I'm Tuby! Here to help you