Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

please solve it in java and when you post the answer, copy the text and then pas

ID: 3774293 • Letter: P

Question

please solve it in java and when you post the answer, copy the text and then paste it. i need to copy the text not to write it .. A classic Rubiks Cube of size 3 x 3 x 3 is a three dimensional combination puzzle that has six faces. Each of the six faces is covered by nine stickers, each of one of six solid colors: white, red, blue, orange, green, and yellow. White is opposite yellow, blue is opposite green, and orange is opposite red, and the red, white and blue are arranged in that order in a clockwise arrangement. An internal pivot mechanism enables each face to turn independently, thus mixing up the colors. For the puzzle to be solved, each face must be returned to have only one color. The figures below are examples of Rubik's Cube of size 3 x 3 x 3. Figure 1 represents the solved cube, Figure 2 shows the shuffled cube, and Figure 3 illustrates the six faces ofthe cube. Figure 3, Cube Faces Figure 2. Shufned Cube Figure 1. Solved Cube Learn more abou this puzzle by Googiing it 2. Which data structure do you recommend to implement a cube of size n x n x n? And why? Oustify your answer). 3. Write a program (for a cube of size 3x3x3) that does the followings: a. Rotate Up: rotates the up face. b. Rotate Bottom: rotates the bottom face. c. Rotate Left: rotates the left face. d. Rotate Right: rotates the right face. e. Rotate Front: rotates the front face. Rotate Back: rotates the back face. g. Shuffles the faces of the cube. h. Solves the cube and shows the solution step by step. 4. Compute the time and space complexities of the program you wrote in part (3). 5. Extend part (3) such that the program can also run on cube of size n x n x n. 6. Com the time and space complexities of the program you wrote in part (5).

Explanation / Answer

BFS(Breadth-First-Search) data structure can be used.