O(n)time with arrays become
O(1)time with LLs because all subsequent elements do not need to be shifted in memory. Only pointers of previous and next elements in the list need to be updated.
O(1)time with arrays becomes
O(n)time with LLs because the only way to access an element in the middle of a LL is to traverse the list until we reach that element.