Click Here to go back to the homepage.

Mirror Images Solution:


import java.util.Scanner;

public class Main {
    static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        int cases = Integer.parseInt(sc.nextLine());
        for(int i = 0; i < cases; i++){
            System.out.println("Test "+ (i + 1));
            int rows = Integer.parseInt(sc.next());
            sc.nextLine();
            String[] image = new String[rows];
            for(int j = rows; j > 0; j--) {
                image[j - 1] = new StringBuilder(sc.nextLine()).reverse().toString();
            }
            for(String j: image){
                System.out.println(j);
            }
        }
    }
}