comefrom: <awangdev>724. Find Pivot Index_1.java
code: public int pivotIndex(int[] nums) {
          if (nums == null || nums.length == 0) return -1;
          int n = nums.length;
          for (int i = 1; i < n; i++) nums[i] += nums[i - 1];
  
          if (nums[n-1] - nums[0] == 0) return 0;
          
          for (int i = 1; i < n; i++) {
              if (nums[i - 1] == nums[n - 1] - nums[i]) return i;
          }
          
          return -1;
      }
masked: public int sample_funcname ( int [ ] var_0 ) {
    if ( var_0 == null || var_0 . length == 0 ) return - 1 ;
    int var_1 = var_0 . length ;
    for ( int var_2 = 1 ;
    var_2 < var_1 ;
    var_2 ++ ) var_0 [ var_2 ] += var_0 [ var_2 - 1 ] ;
    if ( var_0 [ var_1 - 1 ] - var_0 [ 0 ] == 0 ) return 0 ;
    for ( int var_2 = 1 ;
    var_2 < var_1 ;
    var_2 ++ ) {
      if ( var_0 [ var_2 - 1 ] == var_0 [ var_1 - 1 ] - var_0 [ var_2 ] ) return var_2 ;
    }
    return - 1 ;
  }
  