Flipping an Image
Flip a binary matrix horizontally (reverse each row) then invert every bit (0→1, 1→0). Process each row in-place using two-pointer reversal and XOR inversion.
Flip a binary matrix horizontally (reverse each row) then invert every bit (0→1, 1→0). Process each row in-place using two-pointer reversal and XOR inversion.