hw/hw4/hw4/puzzle/Board.java
public int hamming() {
        int numOfWrong = 0;

        for (int i = 0; i < N * N - 1; i++) {
            if (board.get(i) != i + 1) {
                numOfWrong += 1;
            }
        }

        return numOfWrong;
    }
/**
     *  Hamming estimate.
     *
     *  The number of tiles in the wrong position.
     */
Hamming estimate.
The number of tiles in the wrong position.
Hamming estimate . The number of tiles in the wrong position .
public int hamming() {
        int numOfWrong = 0;
        for (int i = 0; i < N * N - 1; i++) {
            if (board.get(i) != i + 1) {
                numOfWrong += 1;
            }
        }
        return numOfWrong;
    }
public int hamming ( ) { int numOfWrong = 0 ; for ( int i = 0 ; i < N * N - 1 ; i ++ ) { if ( board . get ( i ) != i + 1 ) { numOfWrong += 1 ; } } return numOfWrong ; }
Hamming estimate.
Hamming estimate .