Question 1 of 5
A harbor lamp board stores brightness in a rectangular int[][] named grid. Write a method that reverses one entire row in place.
public static void reverseRow(int[][] grid, int row)
{
/* complete the method */
}
(a) State which pair of indexes should be swapped first when the chosen row has length 4. (b) Write a loop that swaps from the ends toward the middle. (c) Give the row values after reverseRow is called on {2, 5, 9, 1}.