Skip to content
This repository was archived by the owner on Mar 22, 2024. It is now read-only.

Latest commit

 

History

History
23 lines (13 loc) · 1017 Bytes

File metadata and controls

23 lines (13 loc) · 1017 Bytes

07 - LinkedLists vs ArrayLists

ArrayLists

  • ArrayLists are a type of list that are implemented as an array.
  • This means that the elements are stored in a contiguous block of memory.
  • This makes it easy to access any element in the list, but it also means that if you want to add or remove an element from the middle of the list, you have to shift all the elements after it to make room for the new element or to fill the gap.

LinkedLists

  • LinkedLists are a type of list that are implemented as a linked list.
  • This means that the elements are stored in a non-contiguous block of memory.
  • This makes it easy to add or remove an element from the middle of the list, but it also means that if you want to access an element in the middle of the list, you have to traverse the list from the beginning to the element you want.

Materials


06 - Dynamic Arrays | Home | 08 - Big O notation