The restoration formula is as shown in the figure:
Bottom corner return: U MF' L2 MF L U L2' U' L.
Middle edge return: L2 MU L2 MU' U' R' U' R U B U B' F U' F' U L' U2 L U L' U2 L.
Vertex position: R' U' F' U F R (If the color of only one side of the magic cube is the same as the color of the "heart", but the other colors and directions are not correct, it is called "face position" ").
Returning the bottom edge: B D R' D R' (if the position and direction of the magic square are correct, it is called "returning").
Top edge return position: U R' U2 R U R' U R Top corner surface position: U L U' R' U L' U' R.
Vertex corner return: CU2 L F(R' U L U' R U L' U')F' L' (C--whole M--middle).
The most basic and minimum formula for restoring the Rubik's Cube is the typical steps: return the bottom edge → return the bottom corner → return the middle edge → return the top edge → return the top edge → return the top corner → top Corner return.
Extended information:
First put 1 in the middle of the first row of the matrix, and then place the numbers into the matrix in ascending order along the upper left corner. If it goes out of bounds, assume there is a matrix around it and put the number in that position; if that position is already occupied, skip the position and put it in the position below, and then put it in the original way again.
In the 5×5 magic matrix, after placing 1, place 2 in the upper left corner of 1, but this time it has crossed the line. Assume that there is another matrix on top of the original matrix, then the number 2 should be placed in the second position of the last row, and then the number 3 should be placed in the upper left corner of 2.
Put it down one by one. When it is placed at 6, since 1 has already occupied the next position, it is placed below 5. Follow this pattern until all the numbers have been released.
Baidu Encyclopedia - Rubik's Cube Matrix