A technique is provided to either insert or delete a leaf in a Patricia
tree having a direct table and a plurality of PSCB's which decode
portions of the pattern of a leaf in the tree without shutting down the
functioning of the tree. A leaf having a pattern is identified as either
a leaf to be inserted or deleted. Using the pattern, the tree is walked
once to identify the location of the leaf to be deleted or the location
where the leaf is to be inserted. If it is a delete operation, the leaf
to be deleted is identified and deleted, and any relevant PSCB modified,
if necessary. If it is an insert operation, the tree is walked a second
time to insert the leaf and reform or create any PSCB in the chain that
needs to be reformed or created. The technique also is applicable to
inserting or deleting a prefix of a prefix.