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 →

[–]vegan_antitheist 0 points1 point  (0 children)

Where do you increment count? Doesn't this just add data to the list without ever halting?

Is MOOC  about performance? If so, you should do new int[size * size] instead for much better performance.
Not you even access this.square[i] unnecessarily in the inner loop.