← Questions
Flip, invert and smooth a binary image
0
I was asked this
No reports yet. Sign in to say where you were asked it.
You get a binary matrix. Mirror each row left to right and flip every bit, then smooth the result: each cell becomes the floor of the average of itself and its neighbors in the surrounding 3 x 3 block, counting only cells inside the matrix. Every average must use the fully transformed matrix, not cells you've already overwritten. Return the new matrix and leave the input untouched.
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
