comefrom: <gouthampradhan>math_GlobalAndLocalInversions_1.java
code: public boolean isIdealPermutation(int[] A) {
      if (A.length == 0 || A.length == 1) return true;
      int max = Integer.MIN_VALUE;
      for (int i = 1; i < A.length; i++) {
        if (A[i] < max) {
          return false;
        } else {
          max = Math.max(max, A[i - 1]);
        }
      }
      return true;
    }
masked: public boolean var_0 ( int [ ] var_1 ) {
    if ( var_1 . length == 0 || var_1 . length == 1 ) return true ;
    int max = Integer . MIN_VALUE ;
    for ( int var_2 = 1 ;
    var_2 < var_1 . length ;
    var_2 ++ ) {
      if ( var_1 [ var_2 ] < max ) {
        return false ;
      }
      else {
        max = Math . max ( max , var_1 [ var_2 - 1 ] ) ;
      }
    }
    return true ;
  }
  