ArrayList | LinkedList |
|---|---|
|
|
Fast random access | Slow random access |
Insertions in the middle can require shifting | Insertion in the middle is efficient. |
Access by Index: Fast - O(1) | Access by Index: Slow - O(n) |
Loading…
ArrayList | LinkedList |
|---|---|
|
|
Fast random access | Slow random access |
Insertions in the middle can require shifting | Insertion in the middle is efficient. |
Access by Index: Fast - O(1) | Access by Index: Slow - O(n) |