I set up the arrayList class with template, so we can change any data type that we want
The biggest difference is the resize between a linked list and an array
A linked list is dynamic, so we don't have to resize the list
An array has to be resized when out of the size, and this costs O(n) runtime.
I set up the arrayList class with template, so we can change any data type that we want The biggest difference is the resize between a linked list and an array A linked list is dynamic, so we don't have to resize the list An array has to be resized when out of the size, and this costs O(n) runtime.