Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Multi Dimensional Array Evaluation Task

Suppose you are part of a photo editing application’s developer team. You have
been asked to design a module where a photo will be flipped vertically. You
know that a photo can be considered as a 2D matrix where every cell is actually
a single pixel consisting of colors. Now you do understand that to flip a photo
vertically, you need to reverse the columns of the matrix.

Suppose you are given a 2D array of numbers where each number represents a
pixel. Now write a method that performs the flip operation on the 2D array.

Sample Input Output


| 8 | 10 | 2 | | 10 | 10 | 0 |
------------------- -------------------
| 3 | 14 | 14 | | 0 | 4 | 7 |
------------------- -------------------
| 0 | 4 | 7 | | 3 | 14 | 14 |
------------------- -------------------
| 10 | 10 | 0 | | 8 | 10 | 2 |
------------------- -------------------

| 14 | 8 | 0 | 4 | | 5 | 13 | 5 | 10 |
------------------------- -------------------------
| 9 | 8 | 13 | 13 | | 2 | 10 | 13 | 6 |
------------------------- -------------------------
| 9 | 3 | 1 | 4 | | 9 | 3 | 1 | 4 |
------------------------- -------------------------
| 2 | 10 | 13 | 6 | | 9 | 8 | 13 | 13 |
------------------------- -------------------------
| 5 | 13 | 5 | 10 | | 14 | 8 | 0 | 4 |
------------------------- -------------------------

You might also like