hw/hw5/SeamCarver.java
private boolean checkSeam(int[] seam) {
        int prev = seam[0];
        for (int i = 1; i < seam.length; i += 1) {
            if (seam[i] - prev > 1) {
                return true;
            }
            prev = seam[i];
        }
        return false;

    }
/**
     *  private helper method
     *
     *  sanity check of seam
     */
private helper method
sanity check of seam
private helper method sanity check of seam
private boolean checkSeam(int[] seam) {
        int prev = seam[0];
        for (int i = 1; i < seam.length; i += 1) {
            if (seam[i] - prev > 1) {
                return true;
            }
            prev = seam[i];
        }
        return false;
    }
private boolean checkSeam ( int [ ] seam ) { int prev = seam [ 0 ] ; for ( int i = 1 ; i < seam . length ; i += 1 ) { if ( seam [ i ] - prev > 1 ) { return true ; } prev = seam [ i ] ; } return false ; }
private helper method
  sanity check of seam
private helper method sanity check of seam