Why does dynamic array always double by a factor of 2?
- by Phoenix
I was wondering how does one decide the resizing factor by which dynamic array resizes ?
On wikipedia and else where I have always seen the number of elements being increased by a factor of 2? Why 2? Why not 3? how does one decide this factor ? IF it is language dependent I would like to know this for Java.