, 2 (elements.length * 2). ?
, 5. , , ( , ).
, 1000 , , , 1000 . , , , .
When you add too much, you waste memory, but if you add too little, you probably need to copy the array too much, which is inefficient because it means that you are more likely to adjust the current array when you add new elements.
source
share