src/RubiksCube.java
// Modifies cube (Node array)

Modifies cube (Node array)
Modifies cube ( Node array )
private void cyclePermute(int[] indices) {
        int cycleSize = indices.length;
        if (cycleSize == 0)
            throw new IllegalArgumentException("Cycle must have non-zero size");
        Node temp = cube[indices[cycleSize - 1]];
        for (int i = cycleSize - 1; i > 0; i--) {
            cube[indices[i]] = cube[indices[i - 1]];
        }
        cube[indices[0]] = temp;
    }
private void cyclePermute ( int [ ] indices ) { int cycleSize = indices . length ; if ( cycleSize == 0 ) throw new IllegalArgumentException ( "Cycle must have non-zero size" ) ; Node temp = cube [ indices [ cycleSize - 1 ] ] ; for ( int i = cycleSize - 1 ; i > 0 ; i -- ) { cube [ indices [ i ] ] = cube [ indices [ i - 1 ] ] ; } cube [ indices [ 0 ] ] = temp ; }
Modifies cube (Node array)
Modifies cube ( Node array )