Question d’entretien chez Copart

Consider a dynamic array (like std::vector in C++ or ArrayList in Java) which resizes itself when it's full. Suppose every time the array reaches capacity, it doubles in size. What is the amortized time complexity of inserting n elements into such an array, and why?