code: public void remove(Node<T> node) {
      	if (first == node) {
      		removeMin();
      		return;
      	}
      	if (last == node) {
      		removeMax();
      		return;
      	}
      	// if both children of root are black, set root to red
      	if ((root.left == null || !root.left.red) && (root.right == null || !root.right.red))
              root.red = true;
  
          root = remove(root, node);
          if (root != null) root.red = false;
          else first = last = null;
      }
docs: Remove the given node.