coreRuntime/src/sc/util/IntStack.java
public void remove(int val) {
      int[] newVal = new int[elements.length - 1];
      int k = 0;
      for (int i = 0; i <= elements.length; i++) {
         if (elements[i] != val) {
            newVal[k++] = elements[i];
         }
      }
      elements = newVal;
      if (top >= val)
         top--;
   }
/** Remove the ith entry of the stack */
Remove the ith entry of the stack
Remove the ith entry of the stack
public void remove(int val) {
      int[] newVal = new int[elements.length - 1];
      int k = 0;
      for (int i = 0; i <= elements.length; i++) {
         if (elements[i] != val) {
            newVal[k++] = elements[i];
         }
      }
      elements = newVal;
      if (top >= val)
         top--;
   }
public void remove ( int val ) { int [ ] newVal = new int [ elements . length - 1 ] ; int k = 0 ; for ( int i = 0 ; i <= elements . length ; i ++ ) { if ( elements [ i ] != val ) { newVal [ k ++ ] = elements [ i ] ; } } elements = newVal ; if ( top >= val ) top -- ; }
Remove the ith entry of the stack
Remove the ith entry of the stack