1. Adding an element to the beginning of the list

    1. Answers:
      1. Linked List: $O(1)$
      2. Array: $O(n)$
  2. Adding an element to the end of the list (what are things to consider for arrays?)

    1. Answers: Whether there is still free space or if the array is already full
      1. Array(full): $O(n)$
      2. Array(Not Full): $O(1)$
  3. Adding an element to the middle of the list

    1. Answers:
      1. Linked List: $O(1)$
      2. Array List: $O(n)$
  4. Deleting an element from the end of the list

    1. Answers:
      1. $O(1)$
  5. Deleting an element from the middle of the list

    1. Answers
      1. Linked List: $O(1)$
      2. Array List: $O(n)$
  6. Deleting an element from the beginning of the list

    1. Answers:

      1. Linked List: $O(1)$
      2. Array List: $O(n)$

      Finding an element in the list

  7. Answers:

    1. Array: $O(1)$
    2. Linked List: $O(n)$
  8. Accessing the 5th element of the list (assuming there are at least 5 elements)

    1. Answers:
      1. Linked List: $O(n)$
      2. Array: $O(1)$

What are some of the disadvantages of arrays?

If an array is full, adding becomes more inefficient vs Linked Lists because a new array needs to be created and all the previous elements need to be copied over.

What are some ideas you have for improving upon these disadvantages?

You can use a Circular array.

What are some of the disadvantages of linked lists?

Accessing elements is inefficient compared to Arrays because you need to loop through all elements.

What are some ideas you have for improving upon these disadvantages?