void resize()


Resizes the dynamic array by creating a new array with increased capacity and copying elements.