Skip to content

Latest commit

 

History

History
36 lines (21 loc) · 1.33 KB

README.md

File metadata and controls

36 lines (21 loc) · 1.33 KB

List

It's an abstract data types
List or Sequence represents a countable number of ordered values

Array list

Resizable array implementation of the List interface.

  • O(1) because you know there exists an index.
  • O(n) when you want to get all the elements.
  • O(n) when you want to remove an element because the list have to reorder the elements

Arrays list you have to define its capacity
Capacity = Maximun number of items that the list can hold
Size = Number of items currently into the list.

Vectors

Same as array list just is a safe thread in Java

Singly Linked Lists

Similar to Arrays list just that here doesn't exist the index so manipulate of data have to do through points This points are related with the next element in the list E.g: LinkedList

  • O(n) to add or remove and element in a specific point since we have to traverse the list

Doubly Linked Lists

DoublyList

  • O(n) to add or remove and element in a specific point since we have to traverse the list