Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualParadigm Shifter

Posted 30 March 2013 - 07:06 PM

I thought an ArrayList in Java was a resizeable array and not a linked list... could be wrong though, it could actually be a linked list.

 

Basically:

 

array type data structure = fast random access to any element in the data, resizing can be expensive if the size exceeds current capacity, insertions/removals not at the end mean elements have to be moved.

 

linked list type data structure = slow random access (linear traversion is quick though), no penalty for resizing or insertion/deletion of elements anywhere in the list.


#1Paradigm Shifter

Posted 30 March 2013 - 07:05 PM

I thought an ArrayList in Java was a resizeable array and not a linked list... could be wrong though, it could actually be a linked list.

 

Basically:

 

array type data structure = fast random access to any element in the data, resizing can be expensive if the size exceeds current capacity, insertions/removals not at the end mean elements have to be moved.

 

linked list type data structure = slow random access, no penalty for resizing or insertion/deletion of elements anywhere in the list.


PARTNERS