← Questions
Copy a rectangle within a 2D array in place
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Given a 2D array, a rectangular block (top-left corner, height, width) and a destination for its top-left corner, copy the block to the destination with O(1) extra memory. The source and destination may overlap, so choose the copy direction (rows and columns, forward or backward) the way memmove does.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
