computer-graphics-raster-images icon indicating copy to clipboard operation
computer-graphics-raster-images copied to clipboard

Can we change code outside where we were instructed to write in the functions?

Open ericxu233 opened this issue 3 years ago • 1 comments

For example, I see some .cpp files have .resize() before the comment "// Add your code here". I wish I could use .reserve() instead since I imagine it would make some coding/algorithms easier by enabling .push_back(). Or is it purposefully placed to force us to think about the indexing more rigorously?

ericxu233 avatar Jan 14 '22 06:01 ericxu233

The resize() is there just to make you aware of the dimension of the output. You have the freedom to choose how you want to implement each operation and you can use standard template library functions in your implementation. Just make sure your submission can be compiled when we mark it.

wenzhi-guo avatar Jan 14 '22 19:01 wenzhi-guo