Back to Browse

Introduction to Memory Management - ArrayList vs LinkedList Performance Java Tutorial APPFICIAL

3.1K views
Apr 18, 2018
3:44

There is a performance problem when you add or remove items that are not at the end of an ArrayList. Each shift of an item from one element to another element requires a few processor instructions. A LinkedList avoids this performance because it does not use contiguous memory locations. Instead, each item contains a "pointer" to the next item's location in memory, as well as the data being stored. However, please note that it is faster to search an ArrayList because it is index based, especially if it is sorted, of if you know the index of where something is. When searching a linked list, you need to traverse through it all. SUBSCRIBE!

Download

0 formats

No download links available.

Introduction to Memory Management - ArrayList vs LinkedList Performance Java Tutorial APPFICIAL | NatokHD