<awangdev>Interleaving Positive and Negative Numbers_2.java
public void rerange(int[] A) {
        if (A == null || A.length <= 1) {
            return;
        }
        List<Integer> positive = new ArrayList<>();
        List<Integer> negative = new ArrayList<>();
        for (int num : A) {
            if (num >= 0) {
                positive.add(num);
            } else {
                negative.add(num);
            }
        }

        int extraPositive = positive.size() > negative.size() ? 0 : 1;
        
        for (int i = 0; i < A.length; i++) {
            if (i % 2 == extraPositive) {
                A[i] = positive.get(0);
                positive.remove(0);
            } else {
                A[i] = negative.get(0);
                negative.remove(0);
            }
            System.out.println(A[i]);
        }
    }
public void var_0 ( int [ ] var_1 ) {
  if ( var_1 == null || var_1 . length <= 1 ) {
    return ;
  }
  List < Integer > var_8 = new ArrayList < > ( ) ;
  List < Integer > var_9 = new ArrayList < > ( ) ;
  for ( int var_10 : var_1 ) {
    if ( var_10 >= 0 ) {
      var_8 . add ( var_10 ) ;
    }
    else {
      var_9 . add ( var_10 ) ;
    }
  }
  int var_14 = var_8 . size ( ) > var_9 . size ( ) ? 0 : 1 ;
  for ( int var_15 = 0 ;
  var_15 < var_1 . length ;
  var_15 ++ ) {
    if ( var_15 % 2 == var_14 ) {
      var_1 [ var_15 ] = var_8 . get ( 0 ) ;
      var_8 . remove ( 0 ) ;
    }
    else {
      var_1 [ var_15 ] = var_9 . get ( 0 ) ;
      var_9 . remove ( 0 ) ;
    }
    System . out . println ( var_1 [ var_15 ] ) ;
  }
}
