Expanding the array size by twice the existing size is not a requirement, but rather a suggestion. You can choose to expand the array in any increment you want (for example, always expand by 10...
Type: Posts; User: helloworld922
Expanding the array size by twice the existing size is not a requirement, but rather a suggestion. You can choose to expand the array in any increment you want (for example, always expand by 10...
Use the same method that ArrayList uses (it's commonly used for a lot of good reasons):
Keep using your array until it gets full.
When it's full, create a temporary array with double the size as...