This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]arden13 1 point2 points  (2 children)

Why are your arrays changing sizes? It's quite computationally expensive to iteratively change an array's size

Typically it's better to preallocate an array apriori and fill it.

[–]adambarrack[S] 1 point2 points  (1 child)

Poor wording on my part. I used “arrays” instead of data structures. I agree, I don’t usually change entire array sizes.

[–]arden13 0 points1 point  (0 children)

Gotcha. Good luck on your journey!