Rules to play Rubiks Cube
Permute the corners
At this step, our goal is to place the corners of the last layer in their correct position, regardless of their orientation. Locate two adjacent corners that share a color other than the color of the top layer (other than yellow in our case).Turn the top layer until these two corners are on the correct color side, facing you. For instance, if the two adjacent corners both contain red, turn the top layer until those two corners are on the red side of the cube. Note that on the other side, the two corners of the top layer will both contain the color of that side as well (orange in our example).