i dont understand what you have done reverse function we are reverssing rows or coloum and why youu write a[i] + n in the function
Reverse function
@Saumya123456789 every row is being reversed as we are using it on every row, start a[i] end a[i]+n
whole row is covered
hope its cleared if yes dont forget to mark it as resolved 