d3graphTheory icon indicating copy to clipboard operation
d3graphTheory copied to clipboard

Improve vertex ID logic to reuse highest-numbered ID

Open moody-jazz opened this issue 4 months ago • 0 comments

updated the logic for assigning new vertex IDs in Chapter: Vertices and Edges. Currently, when the highest-numbered vertex is removed, the next added vertex receives a new incremented ID, leaving gaps in numbering. This change ensures that if the highest-numbered vertex is removed, its ID is reused for the next vertex added.

Closes #26

moody-jazz avatar Aug 13 '25 07:08 moody-jazz