<gouthampradhan>math_SmallestRangeI_1.java
public int smallestRangeI(int[] A, int K) {
    Arrays.sort(A);
    if (A.length == 0 || A.length == 1) return 0;
    else {
      int low = A[0];
      int high = A[A.length - 1];
      int l = low + (K);
      int r = high - (K);
      if (r > l) return r - l;
      else return 0;
    }
  }
public int sample_funcname ( int [ ] var_0 , int var_1 ) {
  Arrays . sort ( var_0 ) ;
  if ( var_0 . length == 0 || var_0 . length == 1 ) return 0 ;
  else {
    int var_7 = var_0 [ 0 ] ;
    int var_8 = var_0 [ var_0 . length - 1 ] ;
    int var_9 = var_7 + ( var_1 ) ;
    int var_10 = var_8 - ( var_1 ) ;
    if ( var_10 > var_9 ) return var_10 - var_9 ;
    else return 0 ;
  }
}
