Close
Topic list
SudoKube
NINJA
45 mins
Matrices (2D Arrays)
Topics (Covered in this problem)
Problem solved
Skill meter
Matrices (2D Arrays)
-
-
Other topics
Problem solved
Skill meter
Strings
-
-
-
-
Sorting
-
-
Binary Search
-
-
Stacks & Queues
-
-
Trees
-
-
Graph
-
-
Dynamic Programming
-
-
Greedy
-
-
Tries
-
-
Arrays
-
-
SQL
-
-
Binary Search Trees
-
-
Heap
-
-
Bit Manipulation
-
-
Solve problems & track your progress
Checkout your overall progress in every topic here
Become
Sensei
in DSA topics
Open the topic and solve more problems associated with it to improve your skills
Check out the skill meter for every topic
See how many problems you are left with to solve for cracking any stage. Score more than zero to get your progress counted.

# SudoKube

Contributed by
Jaypal Mudaliyar
Ninja
0/200
Avg time to solve 45 mins
Success Rate 45 %
Share

## Problem Statement

#### John wants to test his notations on you. He has given you the initial position of the SudoKube and he has given you a set of operations to be performed on the SudoKube basis of his notation. After applying all the operations, the final SudoKube state should be the same as what John expects. Your task is to apply the operations and print the final SudoKube state.

##### EXAMPLE :
``````Refer to the Sample Input 1 explanation for a better understanding of the operations.
``````
Detailed explanation ( Input/output format, Notes, Constraints, Images )
##### Sample Input 1 :
``````1
4 7 1
2 8 7
6 3 5
5 8 3
3 1 6
9 4 2
5 2 4
3 7 8
5 1 9
6 1 4
9 4 8
2 5 7
7 9 1
1 9 6
6 2 8
8 6 3
7 2 5
3 9 4
1
F
``````
##### Sample Output 1 :
``````6 1 7
2 8 7
6 3 5
5 8 3
3 1 6
9 8 4
5 2 4
3 7 7
5 1 1
2 9 6
5 4 1
7 8 4
9 9 1
4 9 6
2 2 8
8 6 3
7 2 5
3 9 4
``````
##### Explanation Of Sample Input 1 :
``````The Upper Face’s last row after rotation is copied to the first column of the Right Face
The Right Face’s first column after rotation is copied to the first row of the Down Face
The Down Face’s first row after rotation is copied to the last column of the Left Face
The Left Face’s last column after rotation is copied to the last row of the Upper Face.
Similarly, the Front Face is rotated 90 degrees clockwise.
``````

##### Sample Input 2 :
``````1
4 7 1
2 8 7
6 3 5
5 8 3
3 1 6
9 4 2
5 2 4
3 7 8
5 1 9
6 1 4
9 4 8
2 5 7
8 6 3
7 2 5
3 9 4
7 9 1
1 9 6
6 2 8
6
F F F2 L L’ B
``````
##### Sample Output 2 :
``````4 7 1
2 8 7
5 3 5
3 5 4
3 1 6
9 4 2
3 2 4
8 7 8
5 1 9
6 1 4
9 4 8
2 5 7
8 6 5
7 2 3
3 9 6
6 1 7
2 9 9
8 6 1
``````
Auto
Console