Dynamic arrays are an implementation of arrays that allows resizing (an O(n) operation) when they are full, or when a threshold for length is reached.
In the current implementation:
- Array sizes must be explicitly declared, and cannot change once declared.
- An array can only be assigned to a variable if the other variable is also declared as an array with the same size and type.
This makes it impossible to implement dynamic arrays, unless some rules of pseudocode are relaxed. The crux of the issue is that there has to be some way to "pass" arrays around: the current way only allows this if two variables have the exact same declaration.
Dynamic arrays are an implementation of arrays that allows resizing (an O(n) operation) when they are full, or when a threshold for length is reached.
In the current implementation:
This makes it impossible to implement dynamic arrays, unless some rules of pseudocode are relaxed. The crux of the issue is that there has to be some way to "pass" arrays around: the current way only allows this if two variables have the exact same declaration.