Amortized analysis is a very important tool to evaluate time complexity of nontrivial operations. What is the amortized time complexity of the operation of adding an element to the end of a dynamic array?
We highly recommend you getting familiar with the concept of amortized analysis.