title: Time complexity of adding a new item to the back of a array-based list
body: <p>If somebody asked me:" What is the running time complexity of adding a new item to the back of an array-based list?" How do I need to answer it? It can be treated as being <code>O(1)</code> since it is random access. But what if the <code>resize()</code> method is called before inserting(<code>resize()</code>method is used to double the size of array when it is full)? In this case will be linear time. Therefore, which one is correct? <code>O(1)</code> or <code>O(n)</code>?</p>