Given an array-based list implementation, inserting a new element to the current position takes how long in the average case?
\Theta(n)
time\Theta(1)
time\Theta(\log n)
time\Theta(n \log n)
timeThe current position could be anywhere in the list.
We will need to shift values from the current position to the list end forward by one position.
How many we shift depends on the current position.
On average, it will be half the elements in the list.