title: Runtime of arraylist operations add and remove by index
body: <p>For Java ArrayList, is it accurate to say add and remove by index run in amortized constant time, meaning on average it is constant time (in rare cases linear time by setting up the memory so future operations are faster)?</p>