d3graphTheory
d3graphTheory copied to clipboard
Improve vertex ID logic to reuse highest-numbered ID
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