When a node is deleted, we update all the edges linked to it to keep the graph consistent. We also merge edges if the deleted node was between two edges.