Approach #1: Direct [Accepted]
Intuition and Algorithm
We can do this in place. In each row, the i
th value from the left is equal to the inverse of the i
th value from the right.
We use (C+1) / 2
(with floor division) to iterate over all indexes i
in the first half of the row, including the center.
Complexity Analysis

Time Complexity: , where
N
is the total number of elements inA
. 
Space Complexity: in additional space complexity.
Analysis written by: @awice.