Flipping an Image
Try to solve the Flipping an Image problem.
We'll cover the following
Statement
Given that an image is represented by an matrix containing s and s, flip and invert the image, and return the resultant image.
Horizontally flipping an image means that the mirror image of the matrix should be returned. Flipping horizontally results in .
Inverting an image means that every is replaced by , and every is replaced by . Inverting results in .
Constraints:
- Image should be a square matrix.
images[i][j]
is either or .
Create a free account to view this lesson.
Continue your learning journey with a 14-day free trial.
By signing up, you agree to Educative's Terms of Service and Privacy Policy