A1: Use own array resizing implementation, instead of Arrays.copyOf.

to fix compilation on coursera grader.