public void remove(int key) {
    if (key < 0 || key >= myData.length) {
      return;
    }
    if (myData[key] != null) {
      mySize--;
    }
    myData[key] = null;
    if (key == myMaxUsed) {
      for (int i = myMaxUsed; i >= 0; i--) {
        if (myData[i] != null) {
          myMaxUsed = i;
          return;
        }
      }
      myMaxUsed = -1;
    }
    
  }
public void remove(int key)