What is the time complexity of the add() method in an ArrayList (amortized case)?

Last Updated :
Discuss
Comments

What is the time complexity of the add() method in an ArrayList (amortized case)?

O(1)


O(n)


O(log n)

O(n^2)

Share your thoughts in the comments