Array.enlarge
Resize an array to a larger size, filling new entries with copies of a given value. If the new size is smaller than the old one, this method has no effect.
Arguments
The
value
to be used for filling new entries in the array.newSize
is the new size of the array, an integer number.
Return values
None
Complexity
Amortized O(diff), where diff is the difference between the old size and the new size.
Example
Output:
1,2,0,5,Hello,0.300000,
1,2,0,5,Hello,0.300000,newElement,newElement,