comefrom: <awangdev>605. Can Place Flowers_1.java
code: public boolean canPlaceFlowers(int[] flowerbed, int n) {
          if (flowerbed.length == 0 || n <= 0) return true;
          int m = flowerbed.length;
          for (int i = 0; i < m; i++) {
              if (flowerbed[i] == 1) continue;
              int lastVal = i == 0 ? 0 : flowerbed[i-1];
              int nextval = i == m-1? 0: flowerbed[i+1];
              if (lastVal == 0 && nextval == 0) {
                  flowerbed[i] = 1;
                  n--;
              }
              if (n <= 0) return true;
          }
              
          return false;
      }
masked: public boolean var_0 ( int [ ] var_1 , int var_2 ) {
    if ( var_1 . length == 0 || var_2 <= 0 ) return true ;
    int var_5 = var_1 . length ;
    for ( int var_6 = 0 ;
    var_6 < var_5 ;
    var_6 ++ ) {
      if ( var_1 [ var_6 ] == 1 ) continue ;
      int var_8 = var_6 == 0 ? 0 : var_1 [ var_6 - 1 ] ;
      int var_9 = var_6 == var_5 - 1 ? 0 : var_1 [ var_6 + 1 ] ;
      if ( var_8 == 0 && var_9 == 0 ) {
        var_1 [ var_6 ] = 1 ;
        var_2 -- ;
      }
      if ( var_2 <= 0 ) return true ;
    }
    return false ;
  }
  