Question 11
Leo encodes square-grid pictures using two operations. H shifts row 1 by 0 cells, row 2 right by 1, row 3 right by 2, and generally row n right by n−1, wrapping cells crossing the right edge back to the left in order. V does the analogous downward shifts in columns: column n by n−1, with wraparound. The example applies H then V to a 3×3 picture.

What results when the following 1000×1000 picture is encoded in the order V then H?


What results when the following 1000×1000 picture is encoded in the order V then H?




