Amortized Time Complexity
Amortized complexity is the total expense per operation, evaluated over a sequence of operations or we can also say average time taken per operation if you do many operations.
we can understand it with an example of ArrayList.
When an ArrayList hits its maximum capacity, then it will create an array of double the size of old array and copy all the old array elements into a new array.
So, it means if the size of the array is less than the capacity, we only need to add the elements which will take O(1) time complexity but if in case we have to insert at the time when its size is equal to capacity, we will have to create a new array which will take O(2*ArrayList.size) time and O(n) for copying old data, then insertion.